Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Qd8ED4czWC13fziAA0WD8D
Power Automate - Building Flows
Unanswered

Challenges when Mapping Multiple-value Columns Into a Word Template

Like (0) ShareShare
ReportReport
Posted on 6 Oct 2023 15:58:28 by

Greetings Power Automate Powerusers,

I hope this message finds all of you well.

Could you please help me with the final steps of this flow?


Background:
We are trying to extract values from a SharePoint list and populate a Word Template. The first issue we encountered was that we had two columns in the list that required the possibility of multiple values to be selected.

WIT_PA_Builder_0-1696604856153.png


After reading a few of the posts from users here (see links at the bottom), my group developed code for those ones. Namely, 

join(body('Get_items')?['value'][0]['field_9'], '; ')
 
This is what we have so far for the flow itself. (The apply each gets automatically added. It used to happen for the multiple-value options, but that issue should have been solved for at least the two columns we fixed. )

WIT_PA_Builder_1-1696605348501.png

 "For a Selected Item" block:

WIT_PA_Builder_2-1696605411611.png

 For the "Get Items" block: (We have not done anything for the advanced options)

WIT_PA_Builder_3-1696605575568.png

 

"Apply to Each 2" Block:
WIT_PA_Builder_5-1696605766788.png

(Guess: Another possible cause for the apply to each could be double values we have for some cells, like the one below:)

WIT_PA_Builder_6-1696605888773.png

Lastly for the mapping portion, the cells where we have used the join expression pasted above:

WIT_PA_Builder_7-1696606018380.png

 

For completion, here is the "Apply to Each" block:
WIT_PA_Builder_9-1696606210307.png

 

Challenges:

1) However, this is the sort of output I would get:

WIT_PA_Builder_12-1696607165149.png

Where all the propersties of the variable seem to show up.  Is it because there is no "/value" after the "field_9"?
join(body('Get_items')?['value'][0]['field_9'], '; ')

 
2) Because we use "Get Items" instead of "Get Item" or because of the "Apply to Each" block at the bottom, files get created for ALL the lines in our list every time we run the flow. Ideally it would only automatically affect the last file when created.
 
3)  Now, when I try to open the file created directly from SharePoint, Word gives me an error message saying: (This may be completely unrelated. Showed up afterwards, but might as well mention it here.)
WIT_PA_Builder_10-1696606926035.png


And then:

WIT_PA_Builder_11-1696606951633.png

Which generally freezes.

References for Multiple-value Columns:
 
C) Solved: MS Form - Multiple Choice, Multiple answer to Shar... - Power Platform Community (microsoft.com)
===============

Thank you in advance for your time reviewing this problem, and for your help in overcoming these challenges. 
  • AlexEncodian Profile Picture
    4,409 Super User 2025 Season 1 on 09 Oct 2023 at 16:23:16
    Re: Challenges when Mapping Multiple-value Columns Into a Word Template

    @Anonymous 

    This is expected behaviour.

    You are using "Get Items" which is an array of items. Therefore it creates an apply to each to cycle through each item that you are getting. And since you inserted the Populate Word file into the apply to each, it populates a template for each of those values. 

    I don't follow what you are actually trying to achieve to be honest.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard
Loading started