web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / HTML table prints dupl...
Power Automate
Answered

HTML table prints duplicate rows

(0) ShareShare
ReportReport
Posted on by 1,712

Hello,

 

I have used to create HTML table action to map some fields and display them in an email.

Unfortunately, I couldn't find a value for case action in dynamic content to fill the *From.
Besides, I have used List records action and I was able to fill the *From field.
But as a flow results in the Create HTML table action prints duplicate rows, since it should print only one row.

I want to trigger the following fields in the flow below:

Flow.PNG

Here are the results:

Flow Result.PNG


What I should change to make the HTML table action print only one row?

 

Any help will be greatly appreciated.

Thank you!

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Julien2 

     

    You can create an array first with the filtered values. From your flow, I can see that you are not filtering the values returned from the list records action (because then in the condition branch it would create an apply to each loop and my guess is that the condition is checking the status reason for the get record action). 

     

    Once you filter the records appropriately, add an append to array variable action within the apply to each loop and then create the HTML table outside using the array. I did a sample of detecting and deleting duplicate records from dynamics using the arrays and creating html tables and you can find it here: https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Delete-duplicate-records-items-from-Dynamics-365-CRM-CDS/ba-p/334853

     

    You might also want to check the status reason filed that you are implying in the condition as it might be looking for an integer value for that particular status reason instead of the label. 

     

    Hope this helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • EBMRay Profile Picture
    1,712 on at

    Hello @yashag2255 ,

    Thanks for your reply.


    I have created a filter array action to check for the status label records that are equals to "Resolved", then apply to each action inside it an Append to array variable action that contains all the related fields, and I have used the TestArray in my HTML table.
    But as a result in the apply to each action, unfortunately, it returns 24 rows which means the HTML table prints again duplicates rows.

    Please take a look at what I've modified:

    Modifications.PNG
    Here are the results:

    Photo1.PNGPhoto2.PNG
    What did I miss?

     

    Looking to hear from you.

    Thanks again!

  • EBMRay Profile Picture
    1,712 on at

    Hello @yashag2255,

     

    Any suggestions to solve this issue?

    Looking to hear from you.

    Thank you.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Julien2 

     

    It will not work like this. you need to add the key value pairs in the html table as shown in the post that I have shared with you. 

     

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • EBMRay Profile Picture
    1,712 on at

    Hi @yashag2255 ,

     

    I have changed in the Html table the columns to Automatic and I am already using the "TestArray" variable in the HTML table.

    The flow fails when I have switched the columns to Automatic also the apply to each function always returns duplicates rows.
    Please take a look at the screenshots below:

    CaptureResult.PNG

    Cap2.PNG

    What could be the issue here?

     

    Looking to hear from you.

    Thank you!

  • EBMRay Profile Picture
    1,712 on at
    Hello @yashag2255,
    Could you please provide an example similarly to my following issue because the blog you mentioned it's helpful but it looks different to my requirements because i have many fields in the HTML table.

    Looking to hear from you.
    Thank you!
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Julien2 

     

    Can you describe a little more about the scenario that you are trying to build? For some reason, I think there is a disconnect in the condition statement to check the status value. 

     

    If you can share more details, we might be able to assist you better with this. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • EBMRay Profile Picture
    1,712 on at

    Hello @yashag2255,

    Sure, please take a look below for the clarification of the flow:

    • When a status of a case has been set to Resolved I want to send an email for the user who created the case within his case details in an HTML table template.
    • The email template as I mentioned will be an HTML table that requires to display the following fields:
      Case Number, Case Title, Subjects(The subjects field is a lookup from Subjects entity where my subjects exist), Modified On (To show the user the time when the case is closed).

    Concerning this condition, I have selected the Status Label from the dynamic content of the action when a record is updated. I didn't face any problem with the condition because as a result, it returns true.

     

    The main problem is that the result of the HTML table, instead of printing the current row that was modified it outputs many rows. So it should only display one row as a result of the selected fields in HTML table.

     

    I hope that you understand my requirements.

    Looking to hear from you.
    Thanks for your support.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Julien2 

     

    Can you also share the entire flow that you have built so far? 

     

    What is the trigger you are using? In my opinion, based on the scenario that you have shared, the flow configuration should look somewhat like this: 

     

    1. Trigger-> When a record is updated (try using the CDS connector and you can filter on the status value itself) and this one will be for the case entity. 

    2. Action-> get record from the case entity, use the identifier from the above action. 

    3. Action-> get record from the subject entity and use the identifier from the dynamic content of step 2. 

    4. Create HTML table with all the custom columns. 

    5. Send email. 

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • EBMRay Profile Picture
    1,712 on at

    Hi @yashag2255,

     

    Sure, please take a look of my entire flow screenshots:

    FlowPic1.PNGFlowPic2.PNG

    FlowEmailResult.PNG

    Services mean the subjects' entity.

    I've used List records using the CDS connector to trigger the subjects entity and used it in the HTML table.
    After that, when I have switched the value of the HTML table from the TestArray to the value of the list records of the subjects entity, it outputs 3 rows. Where it should print the only one row.
    We are very close to solve this issue.

    Could you please take a try on my following flow and tell me your results?

    Looking to hear from you.
    Thank you very much for your support.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard