Extract latest date from webtable

Hi team,
the webtable consist of a column link to download the form but there might be a possiblity that there are two links present so in that case BOT will be checking the date column and on the basis of highest/latest date will be clinking in the link column to download the form.
Can anyone help to bulid this logic.

Thanks,
Zara

Hi @Zara

For this use webscrapping to scrape the entire webtable and then based on datatable manipulation check for latest date and corresponding to that date take the link use download that form which is present in datatable

Hope u got the logic what I had told

Regards

Nived N :robot:

Happy Automation :slight_smile::slight_smile:

can u please share the sample of logic?

Can I have a weblink to show that demonstration? @Zara

apart from weblink…u can take any string and store it into variable…in real workflow i’ll replace it with click…
that if more than one row is present in datatable then click in the column corresponding to highest date in the date column
@c.ciprian can u pls help

Can u Share the screenshot of webtable @Zara

Hi Zara,

You have to perform following steps to achieve this.

1- Scrap the data of web page with data scraping activity including date column as well where all the dates are showing ok. It will give you data table.
2- Now you need to add query on data table to find the latest date ok.
[YourDataTableName].AsEnumerable().Max(Function (drRows) DateTime.Parse(drRows.Item(“DateColumnName”).ToString)).ToString
3. It will give you the latest date then use “get attribute” activity and in the selector add that date and get table row. it will return table row.
4. Pass that table row inside the click activity selector of ‘Download column’ of the table.

Just try it you can do it.

Hope it will work

1 Like

hey…do u have any test xaml…that i can quickly integrate?
i will make changes in the selector part…pls

give me the url where you want to perform this.

I will create a work flow.

I did this in one use case but my workflow will not run on your laptop cuz data scraping will not work on your laptop/ pc because of selector issue and url also will not open, i am doing many things in it so share me url i will create workflow.

URL won’t open for u…
U can share the workflow with activities …i will ammend into mine

ook let me create a workflow.

please…thank you…

I have added log messages indie the workflow it will help you to understand the code and you can make it dynamic according to your requirements .

Let me know in case of any issueDownloading_File_With_Latest_Date.xaml (11.4 KB)

1 Like

will this work for date in the format “7/15/2020” ?

You can set the date according to the format given on the web page.

Do you have skype? You can share your screen with me i will fix this
ghazanfer.ali75

Uipath is throwing error because column name is “Date Submitted” and it is considering Date as a function in datacolumn because of which while passing the query it is throwing error “Date column” does not belong to table

Because you are setting the name of the date column different in the scraping and in the query it is different.
Make sure both are same

yeah i am giving Date Submitted only

then write “Date Submitted” in the query as well in the column name

i just wrote query and try to fetch the result in log…but it is throwing error in the assign only…where i am passing the query