Feed generic value into data table


#1

Hi all,

I am using the “for each row” activity to paste a range of codes from an Excel file into a web based application. Once the code has been received a message appears after some delay and then the next code is pasted into the text field.

I have managed to get this done so far in UiPath, but the next step would be to grab that receiving message and create a new Excel or text file that creates a log file from this. So each pasted code would have an assigned receiving message.

I am using the “get text” activity to grab this receiving message, but since the format is a generic value I am unable to process it further.

How is it possible to convert this generic value into a data table or write it into an excel file?

Thanks!


#2

Whats the format of receiving message? I am assuming that you are using ‘Get Text’ or related activity to grab that receiving text. If yes then it could be of String type. You can manually change it to the type you want from ‘Variables’ tab for that particular variable.

Let me know if i misunderstood the requirement.

Thanks,
Rammohan B.


#3

Thanks for the quick response.

When I try to change the type of the variable in the tab it gives me a compiler error. It only accepts the GenericValue format


#4

Can you attach the screenshot of the error?

After changing the variable type, just clear the field from the ‘Output’ property of the activity and input the same variable again. Let me know if that doesn’t work.

Thanks,
Rammohan B.


#5

I tried what you proposed but unfortunately I still get attached error message


#6

@ckratz In the get text activity Pass variable type as string now you are passing variable type as data table so you are getting error


#7

It gives me the same message when I select any other format than generic value


#8

Yup. As @indra mentioned. The output of Get Text activity should be a string. So create a string variable and set it as the output.

May i know why do you want it to be stored in a DataTable? Are you storing your logs in a text file or try to save it in an excel sheet.

Thanks,
Rammohan B.


#9

Thanks it finally worked when creating a new variable in the tab and setting it as an output afterwards.

Yes the next step would be to create a log file as an Excel file where each pasted code gets its assigned receiving message from the web based program. I thought I have to create a Data Table to write the info into an Excel file


#10

In that case, i believe you can use ‘Write Cell’ activity inside that for each indication that particular row by passing the value of that string.

Thanks,
Rammohan B.