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 / Union Function for mul...
Power Automate
Unanswered

Union Function for multiple columns

(0) ShareShare
ReportReport
Posted on by 3

Hi guys, I have a bunch of columns that contain email address, so I'm trying to make these columns a dynamic value for the email recipients' reference. The problem is all the columns have a duplicate value of email address, I have tried to compose with union function, there is no single error when I run the flow but the duplicate value is still there. So I tried to select only one column and use the union function and it works. But when I select more than one column, the duplicate value is still there, does anyone know where I get wrong?

 

 

this is just an example, actually, I have 28 columns of emailsrwt7zjjhkln71.png

Categories:
  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @zakces 

    I may not be 100% clear on what you are trying to do, but try this:

    1. Create an array variable
    2. Append each of the email address to the array (append to array variable)
    3. Use the union() expression and provide the array variable for both parameters
      1. The result should be a list of unique email addresses.

     

  • zakces Profile Picture
    3 on at

    Hi @ScottShearer thank you so much for your response, but it gave me an error message "... of type 'Array' cannot be appended to the variable 'Email' of type 'Array'. The action type 'AppendToArrayVariable' only supports values of types 'Float, Integer, String, Boolean, Object". 

     

    would you mind telling me where did I get wrong?

     

    messageImage_1631723985679.jpg

  • juliomg Profile Picture
    2 on at

    Hi, @ScottShearer, don't know if you solved it, but this is what i understand and how I would do it:

    • In the select map only one attribute and use a concatenate to merge the 3 fields in one attribute using a ;
    • then use the union as you were using it
    • Do a select again mapping your 3 attributes and do a split in each attribute like this split(item(), ';')[0] for first attribute of the mapping (emailpic), split(item(), ';')[1] for the second (email1), amd split(item(), ';')[2] for the last (email2)

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard