cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Using string variable with multiple outputs

Hi,

 

I am currently working on a flow that retrieves users from sitegroups. Firstly, I used a HTTP request to get the sitegroups, used Parse JSON on that output and used the Title output to create a variable. Photo 1 shows the overall flow.

 

Photo 1Photo 1

Since there are 4 site groups in this test site, these 4 variables are extracted.

Variable 1Variable 1Variable 2Variable 2Variable 3Variable 3Variable 4Variable 4

Now if I would insert a HTTP request in the apply to each using the Group name as a variable with URI: _api/web/getgroups/getbyname('VarGroupName')/users, I will get the following results.

 

_api/web/getgroups/getbyname('Test 1')/users

_api/web/getgroups/getbyname('Test 1Test Members')/users

_api/web/getgroups/getbyname('Test 1Test MembersTest Owners')/users

_api/web/getgroups/getbyname('Test 1Test MembersTest OwnersTest Visitors')/users

 

This photo shows the third result of above mentioned outputHTTP output 3HTTP output 3

Now I know this is due to the Append to string variable input, but does anyone know how I can make sure that one of each of these variables is used.

 

Thanks in advance

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Using string variable with multiple outputs

Hi @Ls1 if you use the "Set variable" action instead of the "Append" action then you will only get one value in the variable at any one time.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

7 REPLIES 7
Highlighted
Super User
Super User

Re: Using string variable with multiple outputs

Hi @Ls1 if you use the "Set variable" action instead of the "Append" action then you will only get one value in the variable at any one time.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

Highlighted
Frequent Visitor

Re: Using string variable with multiple outputs

Wow, I've tried that before, but it didn't work and now suddenly it works?

 

Thanks though!

Highlighted
Frequent Visitor

Re: Using string variable with multiple outputs

@MattWeston365 

 

I works when I apply this to my test site (with 4 site groups), but when I try to replicate this flow to my actual site (100 site groups) it struggles. Any idea how I can still retrieve this big amount of data?

Actual siteActual site

 

Highlighted
Super User
Super User

Re: Using string variable with multiple outputs

When you say it's struggling, is it purely the amount of time it takes to run? What you could try is setting the concurrency on the loop so that it's tackling multiple items in one go. If you click on the ellipsis in the top right of the "Apply to each" and click Settings you'll see an option called concurrency. Flick the toggle, and then you have have up to 50 parallel runs.

 

That may help you to reduce the run time of your Flow.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Highlighted
Frequent Visitor

Re: Using string variable with multiple outputs

@MattWeston365 

 

Thanks! That solved one of the issues!

 

Now the weird part is that it doesn't recognize any variables, whilst it is the exact same flow as the test site flow.

 

1.JPG2.JPG

Highlighted
Frequent Visitor

Re: Using string variable with multiple outputs

@MattWeston365 

 

Tried to duplicate it again and now it works. Thanks for your help, you're a life saver!

Highlighted
Super User
Super User

Re: Using string variable with multiple outputs

Haha the Force is with us 🙂 Have a good day





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (2,390)