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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Custom columns in HTML...
Power Automate
Unanswered

Custom columns in HTML table create unwanted "Apply to each" which ruins the flow

(0) ShareShare
ReportReport
Posted on by 28

I Have a flow which groups Sharepoint list items per email and then will send email. I have managed to group items per email and create HTML table which then is sent. I tried to format the table by using custom columns but when I start doing it "Apply to each" is automatically created which loops the action and user gets numerous email instead of one with grouped items.

Is there any other way I can just delete unwanted columns after creating HTML table?

 

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    Are you able to post a screenshot(s) of your flow to see how it's currently setup and what you are using for the HTML Table?

  • JoannaW Profile Picture
    28 on at

    Sure, here it is.

    1. Get items Sharepoint list

    2. Then Select - mapping email:

    JoannaW_0-1666357988875.png

    3. Compose - getting unique emails, expression is: 

    union(body('Select_-_get_emails'),body('Select_-_get_emails'))

    JoannaW_1-1666358048183.png

    4. Filter array&create HTML table. Output is from Compose action.

    Value for filter array is: items('Apply_to_each')?['COEsemail']

    Body in create HTML table is from Filter array.

    JoannaW_3-1666358208857.png

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Everything looks fine to me. Not sure why you would get another loop when you go to use custom columns in the Create HTML table unless you're using fields directly from the Get items action instead of the Filter array.

     

    Another option to just have the columns you want in the HTML table is to use a Select after the Filter array (using the Filter array fields as the values). Then use Create HTML table using the Select output (which only has the columns you want).

  • JoannaW Profile Picture
    28 on at

    From filter array I only have "Body" or "Item" available in dynamic content, not the exact fields I need:

    JoannaW_0-1666363027803.png

     

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    For the value you can just use the expression below to get each field value:

    item()?['NAME_OF_COLUMN']

    Example: I wanted to get the Title of the item and the COEs Display Name (assuming your field is called COE) you could use the following:

    item()?['Title']
    item()?['COE/DisplayName']

    To see all the actual field names, you can look at the output of your Filter array.

  • JoannaW Profile Picture
    28 on at

    Thanks a lot @grantjenkins !!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard