Hello guys. Im writing a robot, that will fill in certain information inside of an application. So far it was going well, but i rant in to a little problem. Inside the application there is a table. I need to fill in some specific information in the tables last rows and in different collumns, but I don know how to achieve it. Click activity doesnt work, because sometimes there are 4 rows in a table, sometimes 3 and sometimes 0. Can you please give some advice on how to achieve what i want? The table looks like this:
Hi,
Can you share if you can indicate each cell or not?
If former, can you share information for selector using UiExplorer etc.
If latter, we might need to use Native mode.
Regards,
Thanks for the response
This is the cell that was used for the click activity:
This is the output of selectors:
"<wnd ctrlname='TableLayoutPanel1' /><wnd ctrlname='panForForms' /><wnd ctrlname='frmPKOrgKodai' /><wnd ctrlname='TableLayoutPanel1' /><wnd ctrlname='grdPKOrgKodai' /><ctrl name='DataGridView' role='table' /><ctrl name='Row 3' role='row' /><ctrl name='Kodo Tipas Row 3' role='cell' />"
Hi,
Can you try if TableExtraction or DataScraping works? if it works, we can get DataTable, and know count of rows from it.
Regards,
It actually works really good
But what are the further steps?
And is there no method with the selectors? For example, click on the last row or something?
HI,
From the above, we can know there are 4 rows in the table. If we need to click the last row, we can click using the following dynamic selector.
rowNumber = ExtarctDataTable.Rows.Count-1
then
"<wnd ctrlname='TableLayoutPanel1' /><wnd ctrlname='panForForms' /><wnd ctrlname='frmPKOrgKodai' /><wnd ctrlname='TableLayoutPanel1' /><wnd ctrlname='grdPKOrgKodai' /><ctrl name='DataGridView' role='table' /><ctrl name='Row {{rowNumber}}' role='row' /><ctrl name='Kodo Tipas Row {{rowNumber}}' role='cell' />"
https://docs.uipath.com/studio/standalone/2023.4/user-guide/dynamic-selectors
Regards,
Thanks yet again for the response, but can you explain this to me? So with the steps u mentioned, it will always click on the last row in the specified collumn? Even if there are more or less rows than 4?
And what is this error? How could i solve it?
@Povilas_Jonikas
Change variable type from string to int32
Thanks, but not yet another thing is unclear for me
It says that i havent defined it in current scope, but it is in the scope it needs to be
Hi,
The message is not good and i raised the following post to request to improve.
If you need to validate element in dynamic selector, please set value in default value of variable selector. Validator checks the element as the variable has the default value.
Regards,
Ok, so from what I understand, I need to put the variables default variable in selector editor for the rowNumber variable. When I put the default value of var rowNumbers, i get an error. The value that I put in is the same as in the assign activity.
Hi,
Default value must be literal such as 1 or 2 etc. ,because we cannot know what value the variable has in variable unless run.
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.