Hi all,
Recently, I have retrieve a web site HTML data table and store in a variable data table using (extract data from webpage feature). The task is require to get the last row of each data table (the row of each HTML table is differ in every query). Any expert know which function can I get the last row of value in datatable. For example in this case the last row is Product 6, but for the next record may be differ number.
Solved! Go to Solution.
This site lists all variable datatype properties: https://docs.microsoft.com/en-us/power-automate/desktop-flows/datatype-properties#datatables
You can reference a datarow from a datatable using %DataTable[#]% where %DataTable[0]% is the first datarow.
We can get the number of rows using %DataTable.RowsCount%.
Since, the first datarow starts at 0, this is actually what we need to do:
After getting the datatable to %DataTable%,
Set Variable %LastDatarow% to %DataTable.RowsCount - 1%.
Now, you can reference %DataTable[LastDatarow]% to get the last data row.
This site lists all variable datatype properties: https://docs.microsoft.com/en-us/power-automate/desktop-flows/datatype-properties#datatables
You can reference a datarow from a datatable using %DataTable[#]% where %DataTable[0]% is the first datarow.
We can get the number of rows using %DataTable.RowsCount%.
Since, the first datarow starts at 0, this is actually what we need to do:
After getting the datatable to %DataTable%,
Set Variable %LastDatarow% to %DataTable.RowsCount - 1%.
Now, you can reference %DataTable[LastDatarow]% to get the last data row.
Hi Michael,
Thank you very much, you are my automate expert.
I can retrieve the last row from data table
Henry
Thanks
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
User | Count |
---|---|
19 | |
7 | |
5 | |
3 | |
2 |