Hello everyone. What should be the data type for combination of text and numbers? Thanks
Hi,
In general, it will be String type.
Regards,
Hello. For instance, I am trying to get this column in the excel file using Get Row Item Activity
Code
43234
12312
12312
12412
then placed it in a variable named chargeCodes, what should be the data type of chargeCodes? I tried to use String but it says that “Get Row Item: StringConverter cannot convert from System.Double.”
Do you know what to do?
Hi,
in this case, can you try GenericValue(UiPath.Core.GenericValue) type? Then convert to String type using ToString method, if necessary.
Regards,
Do i need to download a package for that type? when i tried to input that in the search bar, nothing shows…
oh wait. i saw it
it worked!! thank you so much!!
Can I ask you a question regarding HTML? That is if it’s okay with you
Hi,
Do you mean the following topic?
Can you elaborate output you expect?
Regards,
yepp, that is the one!! My expected output is that the Employee Country/Region will be displayed in the next column because I am using html tag. Then same goes with Expense type. I am not sure if it is visible but I tried to use and
tried to use tr and td*
Hi,
alright. I’ll reply in the topic.
Regards,
This is totally unnecessary. The variable can just be a string, no conversion necessary.
Hi @postwick ,
There are some cases to need to use GenericValue type , as the following, for example.
Then, use ToString method to make sure conversion to String.
Can you check the following simple sample?
Regards,
Why would you need to use generic value there? If you’re getting a number, the variable should be an integer or double. If you’re getting a string, it should be string. In your example, you’re trying to put a double into a string value. If you want that value in a string, use an Assign (instead of Get Row Item) and use CurrentRow.Item(0).ToString
I never use those activities like Get Row Item. It’s much better to just do an Assign and be specific.
In fact, the point to Generic Values is that you don’t have to explicitly convert them.
Hi @postwick ,
Basically, you’re right. However, in some cases, Studio dosen’t accept it , as the following, for example. Although it might be depended on environment (such as version), I suggested to use ToString to makes sure conversion.
Can you check the following xaml?
Sequence.xaml (8.7 KB)
Regards,
It’s always better to use proper datatypes and be specific in your code. Makes it easier to understand what’s happening, find errors, etc.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.