cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Paulos29
Helper I
Helper I

Counting records of HTML table and finding value of specific column of HTML table

Hello all,

 

I have a flow which pulls data out of sharepoint Library and creates array of emails found in one of the column of that sharepoint library.

Then I create HTML table that sums up the records for a specific relationship manager. My flow works ok but I am looking to get:

- the number of records for each HTML table for each specific RI (or count RI number)

- get the value for RI (it will be the same name in each table record as it is summary per RI)

 

Essentially the HTML table will look something like below:

 

Paulos29_2-1627209399732.png

So in this case I would like to get:

- the number of records in a table (which is 3)

- the specific name from column RI (which is identical for all 3 rows)

 

I tried to use the length expression for table records but it gets the wrong number (also tried to add another apply to each to loop and count records of each specific HTML table but it produced errors) .

I also want to get RI name from the first column to be assigned to variable (which i initialize at the beginning of the flow) to use on the send email (V2) action.

 

 

Flow snippet

 

Paulos29_0-1627208860036.png

 

Paulos29_1-1627208993759.png

 

Any help would be much appreciated. Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Paulos29 :

In essence, an HTML table is a string, so you cannot use length to get the number of records in an HTML table. As an alternative, you can directly use length to process the result of the Filter (it is an array) to get the number of records.For example:

vbofengmsft_0-1627365475877.png

 

length(body('Filter_array'))

 

 The Result:

vbofengmsft_1-1627365504255.png

In addition,if you want to get all 'RI's you could try:

vbofengmsft_3-1627365856898.png

The Result:

vbofengmsft_4-1627365877879.png

Best Regards,

Bof

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @Paulos29 :

In essence, an HTML table is a string, so you cannot use length to get the number of records in an HTML table. As an alternative, you can directly use length to process the result of the Filter (it is an array) to get the number of records.For example:

vbofengmsft_0-1627365475877.png

 

length(body('Filter_array'))

 

 The Result:

vbofengmsft_1-1627365504255.png

In addition,if you want to get all 'RI's you could try:

vbofengmsft_3-1627365856898.png

The Result:

vbofengmsft_4-1627365877879.png

Best Regards,

Bof

View solution in original post

Paulos29
Helper I
Helper I

Hi @v-bofeng-msft 

Thank you very much for your reply - it is a fantastic help.

Also thank you for taking time and effort providing the screenshots - it allowed me to see the problem more clearly - your post is excellent.

 

I am still having issues to select loop (Apply to each) when applying 'items' expression (as its simply to available to select from Dynamic content) to get the RI name - I suppose its because I am already in another loop (that iterates through the array of email addresses as a unique values). However you provided me with the route to explore to get the answer so sooner or later I'll get it resolved.

Once again - thank you Sir - your help is enormous.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,431)