cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lipsitz
Advocate I
Advocate I

Adding multiple strings as separate items to a list

I have multiple strings that I would like to add each as an item into a list.

I tried separating them with commas with the "Add Item to list" Action, but it treats them all as one long item. I have tried several formats.

 

abc, def, ghi
"abc", "def", "ghi"
%"abc"%, %"def"%, %"ghi"%

 

But they are all added to item 0

 

Interestingly enough, when adding exiting variables, it does work.

 

 

%Matches[0]%, %Matches[1]%

 

 I doubt the only option is to use a separate action for each. Or alternatively import them from a csv file.

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
fraenK
Memorable Member
Memorable Member

Syntax for a list is: set variable %['item0', 'item1']%

View solution in original post

4 REPLIES 4
fraenK
Memorable Member
Memorable Member

Syntax for a list is: set variable %['item0', 'item1']%

View solution in original post

Lipsitz
Advocate I
Advocate I

I love the app, but the documentation is poor and the syntax not consistent and intuitive.

Thanks for your help though, @fraenK 

Lipsitz
Advocate I
Advocate I

Also, when using "set variable" you are not really adding an item, just manually inserting items at known location.

While it may work for initial list, if you do it with populated list it will overwrite items. not merely append an item to the end of the list.

fraenK
Memorable Member
Memorable Member

If you have an existing list, then you just add the individual items through a loop or merge lists

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,407)