SOLVED

Moving items from one list to another creates multiple entries

%3CLINGO-SUB%20id%3D%22lingo-sub-1788108%22%20slang%3D%22en-US%22%3EMoving%20items%20from%20one%20list%20to%20another%20creates%20multiple%20entries%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1788108%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22lia-message-subject-wrapper%20lia-component-subject%20lia-component-message-view-widget-subject-with-options%22%3E%3CP%3E%3CSPAN%3EI%20setup%20a%20Flow%20that%20when%20a%20new%20list%20item%20is%20created%2C%20the%20flow%20creates%20a%20new%20item%20in%20the%20second%20list%20and%20copies%20the%20values%20from%20one%20to%20the%20next.%20The%20issue%3A%20if%20the%20new%20list%20entry%20has%20a%20column%20with%20multiple%20entries%20from%20a%20Choice%20column%20or%20a%20Managed%20Metadata%20column%2C%20it%20creates%20an%20entry%20for%20each%20variation.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-body%20lia-component-message-view-widget-body%20lia-component-body-signature-highlight-escalation%20lia-component-message-view-widget-body-signature-highlight-escalation%22%3E%3CDIV%20class%3D%22lia-message-body-content%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20concat%20the%20multiple%20selections%20into%20one%20string%20and%20paste%20them%20in%20the%20column%3F%20I%20tried%20creating%20variables%20outside%20the%20for%20each%20loops%20to%20consolidate%20the%20selections%20into%20one%20string%2C%20but%20was%20unsuccessful.%20This%20is%20the%20working%20Flow%20based%20on%20a%20Microsoft%20Template.%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1788108%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1799031%22%20slang%3D%22en-US%22%3ERe%3A%20Moving%20items%20from%20one%20list%20to%20another%20creates%20multiple%20entries%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1799031%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F745350%22%20target%3D%22_blank%22%3E%40dirkzwart%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUse%20an%20Array%20variable%20to%20store%20and%20format%20the%20Choice%20column%20lookup%20values.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20is%20my%20sample%20Flow%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22stormin_30_0-1603193756300.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F227975i35B91C521DBA29C8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22stormin_30_0-1603193756300.png%22%20alt%3D%22stormin_30_0-1603193756300.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20%22Append%20to%20array%22%20variable%20is%20not%20an%20expression.%20It%20is%20simply%20the%20formatting%20required%20to%20pass%20it%20into%20the%20%22Create%20item%20step%22.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22stormin_30_1-1603193987951.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F227976i55E3E5635CF791C3%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22stormin_30_1-1603193987951.png%22%20alt%3D%22stormin_30_1-1603193987951.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%3E%7B%22Value%22%3A%22%40%7Bitems('Apply_to_each')%3F%5B'Value'%5D%7D%22%7D%3C%2FPRE%3E%0A%3CDIV%20id%3D%22tinyMceEditorstormin_30_2%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3ELet%20me%20know%20if%20that%20works%20for%20you.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20hope%20this%20helps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENorm%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorstormin_30_3%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1800413%22%20slang%3D%22en-US%22%3ERe%3A%20Moving%20items%20from%20one%20list%20to%20another%20creates%20multiple%20entries%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1800413%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F764913%22%20target%3D%22_blank%22%3E%40stormin_30%3C%2FA%3E%26nbsp%3BThank%20you%20Norm!%20This%20works%20and%20is%20much%20easier%20to%20manage.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I setup a Flow that when a new list item is created, the flow creates a new item in the second list and copies the values from one to the next. The issue: if the new list entry has a column with multiple entries from a Choice column or a Managed Metadata column, it creates an entry for each variation.

 

Is there a way to concat the multiple selections into one string and paste them in the column? I tried creating variables outside the for each loops to consolidate the selections into one string, but was unsuccessful. This is the working Flow based on a Microsoft Template.

2 Replies
Highlighted
Best Response confirmed by dirkzwart (New Contributor)
Solution

Hi @dirkzwart,

 

Use an Array variable to store and format the Choice column lookup values.

 

Here is my sample Flow:

stormin_30_0-1603193756300.png

 

The "Append to array" variable is not an expression. It is simply the formatting required to pass it into the "Create item step".

stormin_30_1-1603193987951.png

{"Value":"@{items('Apply_to_each')?['Value']}"}
 

Let me know if that works for you.

 

I hope this helps.

 

Norm

 
Highlighted

@stormin_30 Thank you Norm! This works and is much easier to manage.