UI Selector

Hi gurus, i have a weekly table generated each week. and on that table there i will have to click on the total: , when the total value cell is clicked on, another list will pop out. and from there i will scrape the list that popped out. however the problem i have now is that the table generated each week is random, meaning the number of rows is not specified, hence the ui selector is unable to correctly click on what i want due to the fact that the row number is different from the selector. my solution is that i firstly data scrape the table, then use read cell to read the number of rows as the variable rowcount(double), i want to use dynamic selector for tablerow = ‘{{rowcount}}’ but an error pops out saying that it must be a string. so in this case how to i proceed to turn the double to a string?

@dylankiu

rowcount variable should be of type String or Integer but not double.

You can convert double to string as below.

        rowcount.ToString

@lakshman ive tried, but this error pops out.

Read Cell: StringConverter cannot convert from System.Double.
Read Cell: Int32Converter cannot convert from System.Double.
when i change the variable from double to string/integer.

@dylankiu

can you upload your xaml here?

you can try assign the output of readcell to a GenericValue variable first, then use variable.toString to convert it to rowCount (rowCount)

@dylankiu

Save the Read Cell activity output in variable of type UiPath.Core.GenericValue and say rowcount and then convert it into string as below.

              rowcount.ToString

Hi all, i manage to solve the double to string problem. however now im stuck at the dynamic selector part, ive assign rowcount1(string variable)= rowcount.tostring.

webctrl tableCol=‘4’ tableRow=‘{{RowCount1}}’ tag=‘TD’

and am unable to validate it.

do note that the tablecol will always be 4 while the tablerow is the variable that will change each week depending on the number of rows of the datatable for the current week.

you can validate it after you give a default value to rowCount1 in the variables tab

@dylankiu

That’s fine. Can you please run the process and check whether it’s working or not.

hey guys thanks for the help, i did not find a way to solve the issue, however i did find another method of making my table hence am no longer required to solve this question in order to copy and paste my values to my worksheet. thanks for the help tho.

Hi @dylankiu ,

If you have found a Solution, Please do Post the Methods used to Solve the issue and Mark it as the Solution to Close the Topic.

In this way, it will benefit others to retrieve Solutions of the Same kind faster.