cancel
Showing results for 
Search instead for 
Did you mean: 

Query on expression error

Hello team,

Please see my scenario below.

Excel Data - Collection - Empty by default - Used to read the Excel file with one of the column is "Name"

Number Data - Number data item that I want to concatenate with.

I need to append the text data item and number data item here so my expression throws the below error,

27862.png

Here is the property of all 3 data items,

27863.png

Please note that the same expression and calc stage runs fine in real-time without any error and it performs the concatenation fine, but here in the studio, it keeps showing 1 error.

Any idea on this?



------------------------------
If I was of assistance, please vote for it to be the "Best Answer".

Thanks & Regards,
Tejaskumar Darji
Sr. Consultant-Technical Lead
------------------------------
17 REPLIES 17

++

@Neeraj Kumar @Mukesh Kumar 



------------------------------
If I was of assistance, please vote for it to be the "Best Answer".

Thanks & Regards,
Tejaskumar Darji
Sr. Consultant-Technical Lead
------------------------------

Hi @Tejaskumar_Darji 

Please see attached, keep in mind this hasnt been fully tested and i had no test data for it but hopefully this does what you need to do.



------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

Thanks, Michael, I imported your page and I see the same error popping.

27821.png

I'm wondering why it is showing in my BP but not in your BP. I'm using the latest BP 7.2, which BP version are you using?



------------------------------
If I was of assistance, please vote for it to be the "Best Answer".

Thanks & Regards,
Tejaskumar Darji
Sr. Consultant-Technical Lead
------------------------------

ah sorry i should have been clear this wouldn't eliminate the error this is only to avoid a failure in the process when running. The error will still exist because the value from the collection cant be defined until runtime after you get the info from excel so the list of errors will still show unknown value. Ideally there are no errors but with the scenario you presented if you cant pre-define the collection then this might have be an acceptable error to leave in your process. 



------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

Okay glad you got my point now.

Awaiting for others to reproduce and confirm.

I have a strong vibe that this is a bug.



------------------------------
If I was of assistance, please vote for it to be the "Best Answer".

Thanks & Regards,
Tejaskumar Darji
Sr. Consultant-Technical Lead
------------------------------

Kishore_KumarDe
Level 4

That is a compilation error that we get. At compilation time, the studio does not know the data type of [Excel.Name] and if I am not wrong it considers it to be NULL. When using concatenation with NULL and Number it gives an error as it will return a NULL value.  But, concatenating  NULL and Text WILL NOT give an error as it will return a text value.

In real-time your [Excel.Name] have some value so you are not getting Run time error. The worst is you will get column not find error if column is not present. Because if column is there then its datatype will be defined.

For testing you can just use any string operation on your number data type which will make it a string format and your compiler error will be gone. In short, you just need to have one String Data type in the whole concatenation operation and that should resolve the error

27846.png

And just FYI, I don't consider it to be a bug in Blueprism. This is just how .NET compiler works and Blueprism is built on top of .NET framework. So, this seems to be an expected behaviour.

------------------------------
Kishore Deka
Lead Software Engineer
EPAM systems
------------------------------

If my answer provided any assistance, please vote as "Best Answer". Kishore Deka Lead Software Engineer EPAM systems Connect on LinkedIn https://www.linkedin.com/in/kishoredeka1410/

diousekou
Level 2

If you  concatenate with an empty string in between it will not  show the error as you are letting BP know to make a casting

[Excel Data.Name]&""&[Number Data]

Maybe this will help with your situation.



------------------------------
sekou dioubate
business optimization specialist
Ascension MSC
America/Indiana/Indianapolis
------------------------------

Thanks @Kishore Kumar Deka, that makes a lot of sense now. Also, the workaround @sekou dioubate suggested works and removes the error because any Text concatenates with a Number results in a Text here because both are known to .NET and then it became a Text itself which in turn now become Coll.Text&Text.

Thanks again for this knowledge.



------------------------------
If I was of assistance, please vote for it to be the "Best Answer".

LinkedIn - https://www.linkedin.com/in/tejaskumardarji/

Thanks & Regards,
Tejaskumar Darji
Sr. Consultant-Technical Lead
------------------------------