I have a webpage with the following 3 columns: Tax Year, Type, Forms Produced + a few others. There are several files with the same file name(FMV for Owner) listed under the Type column, but I need to only select the file with the previous tax year(2023) and the Forms Produced date being some day in January(MM/DD/YYYY) of the current year(2024). Is the best approach to use a find matching pattern activity? If yes, can you help me determine the RegEx pattern to ensure ?
Website for Uipath Question.docx (86.9 KB)
Hi,
Probably, we can achieve it using ForEachUiElement (or TableExtraction) and regex.
So,can you share more detailed information such as screenshot and/or actual text which you can get etc.
Regards,
Hello @kcaller
Does the webpage offer filter options?
If so, you could prior to your table extraction perform the needed filtering.
Alternatively you could extract the table and use “Filter Datatable” afterwards, to get the desired output.
Regards,
Soren
Yes, the webpage does offer filtering and I have coded for that in an attempt to narrow the number of rows. My struggle is with rows having the same file name and possibly same tax year, so I added the parameter of Forms Produced. But I was unsure of the best approach to have the robot look at all 3 parameters together to select the correct file.
I added a picture of the webpage to my original post. I used the filter under ‘Needs Help?’ to narrow down the options but I need to narrow further to ensure I have the correct file selected, hence the 3 parameters I listed. Thanks for your feedback.
- Use extract datatable on the filtered rows
- Then on datatable use a linq pr loop to find the row you need using the value filters
- Then use the row index in idx property and click on the correspondingn row in website
Cheers
Hello @kcaller
You could do the following:
- Extract the table from the website using “Table Extraction”
- Make a For Each row in ExtractDataTable and save the Index from the properties
- Add an IF-sentence with the parameteres that must be met (eg. year 2023)
- Make a Click-activity on the download-button for the row index that matches
Take a look at the example below (download at bottom).
Click in table.xaml (17.5 KB)
Regards,
Soren