cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Working with Multi-select list of options and Approval flow

I am receiving user input via a multi-select list of options:

12-13-2019 3-48-38 PM.jpg

When I select a few of the options (like so)

12-13-2019 2-43-33 PM.jpg

based on these "steps?" / "cards?" / "operations?"

12-13-2019 3-55-25 PM.jpg

the data (after a run) is represented like this:

12-13-2019 3-39-00 PM.jpg

 

Q1: I initialized 'Reviewers' as a string, but why does it look like an array?

 

Q2: What is the difference between the Output of my Compose step, and the Value of the initialized variable? One is multi-line, the other is single line -- but why?

 

Q3: My overall challenge is to parse the Multi-select list of options (given 15 names, the user could select 1-15 per flow run) into 1-15 boolean variables through some sort of logic like "if name 'Kyle' is selected, then set boolean variable 'Kyle' to true. Any suggestions, ideas, documentation resources, examples?

 

My end goal is to setup 15 parallel branches to process Approvals and write-back results in more-or-less real time. "True" branches are processed, "False" branches are not, and the write-back occurs inside the condition. Finally, I evaluate all of the parallel Responses and record the overall Approval status of the library item. Here is a 2-branch version to give you an idea:

12-13-2019 3-42-23 PM.jpg

I've progressed this far using many resources such as https://docs.microsoft.com/en-us/power-automate/parallel-modern-approvals and help from other users on this forum, but I feel like I'm approaching this wrong, or using a the wrong tools. Any help appreciated!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Gristy
Resident Rockstar
Resident Rockstar

1) you are passing a array into compose you would need to build a string from the array to display it differently.

2) Compose is outputting an array, string is outputting a string

3) your string only contains the selected people's name, so in each condition just do a condition like "Reviewers" (this is your variable) contains "Kyle Bloggs". Then that condition will evaluate true and you can setup your approval object.

View solution in original post

2 REPLIES 2
Gristy
Resident Rockstar
Resident Rockstar

1) you are passing a array into compose you would need to build a string from the array to display it differently.

2) Compose is outputting an array, string is outputting a string

3) your string only contains the selected people's name, so in each condition just do a condition like "Reviewers" (this is your variable) contains "Kyle Bloggs". Then that condition will evaluate true and you can setup your approval object.

Anonymous
Not applicable

For answers 1 & 2 -- I guess I am new enough to these tools that your answer does not communicate enough information for me to use.

 

For #3 -- I am using boolean variables because I know how to initialize and set boolean variables. I have not yet found any good references for testing if a string variable "contains" a specific substring. Can you direct me or give me some examples, please?

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,787)