Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Combining multi-choice fields from 2 lists

(0) ShareShare
ReportReport
Posted on by 2
I have a Flow that looks up 2 lists and gets the 2 multi-choice fields in a Select action and I have them displaying in Arrays like this:
Select Action 1:
[
  {
    "Name": "Test1"
  },
  {
    "Name": " Test2"
  },
  {
    "Name": " Test3"
  }
]
Select Action 2 (This one gets put in a ""For Each" control for some reason):
[
  {
    "Name": "Test4"
  }
]
How can I combine these into one so that I can use it to Update item in a SharePoint list?
  • CU13011633-0 Profile Picture
    CU13011633-0 2 on at
    Combining multi-choice fields from 2 lists
    Hi EKarim,
     
    I had to switch "Name" to "Id", so my Select actions look like this:
     
     
    Compose looks like this:
     
    I think I need my Compose to look like this:
    [
      {
        "Id": "90"
      },
      {
        "Id": " 1"
      },
      {
        "Id": " 3"
      },
      {
        "Id": " 2"
      }
    ]
     
    So that I can use it to update a Multi-Choice field in a SharePoint list. 
     
    Is this possible to make it format that way?
     
     
  • Suggested answer
    Ellis Karim Profile Picture
    Ellis Karim 10,529 on at
    Combining multi-choice fields from 2 lists
     
    You can use the union function to merge these two arrays. You can also refine the data by selecting the Switch to Map mode in the Select action to select just the values:

     
     
     
     
     
     
     
     
     
    union(body('Select'),body('Select_2'))
     

     
    Ellis Karim
     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard