cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
in2217
Resolver I
Resolver I

setting local variables used in specific flow

Here is the case:

 

we are building a flow that is triggered by incoming email. 

We then parse the email body, construct JSON and use it to invoke some external REST API.

As we need to process the output of this said REST call, we are using HTTP Response block. Now, Response does not work for flows that are triggered by incoming emails. 

No problem, we put this REST call into subflow and process the response there. Works fine.

We initialize a variable.

Then we want to obtain this variable value  in the main flow. But have no way to get to it.

 

Any suggestions?

Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @in2217,

 

If you would to use a variable value which is saved in another flow, please consider creating a new sharepoint list on your side with a variable column.

 

And then you could refer to steps below:

1. In the first flow, create an item in the new sharepoint list, save the variable value in the variable column. Since the item would be the first item in the sharepoint list, the item id should be "1".

2. In the second flow, add a "get item" action of sharepoint connector, enter the site address, list name and the item id should be "1",then you could get the variable value from the variable column.

 

 

Best regards,

Alice

View solution in original post

4 REPLIES 4
v-yuazh-msft
Community Support
Community Support

Hi @in2217,

 

If you would to use a variable value which is saved in another flow, please consider creating a new sharepoint list on your side with a variable column.

 

And then you could refer to steps below:

1. In the first flow, create an item in the new sharepoint list, save the variable value in the variable column. Since the item would be the first item in the sharepoint list, the item id should be "1".

2. In the second flow, add a "get item" action of sharepoint connector, enter the site address, list name and the item id should be "1",then you could get the variable value from the variable column.

 

 

Best regards,

Alice

View solution in original post

Thank you, Alice.

I saw this solution elsewhere and it could be a workaround for one or two cases, although not an efficient one: adding anoter dependency to the process, and the one that onvolves writing to disk, to a system trough connector that is otherwise not used in this flow, is not a good idea.

 

But what is even worse is that going this way would mean we need to create dedicated SharePoint lists for every single variable we ever use in sub-flows. This is not a sound approach.

 

So on one hand MS Flow  suggests nested flows use as functions, and on the other one we are stripped of return values.  I would call this a questionable idea at least.

 

Do you know if there are any plans to implement actual "function" structure elements in the Flow?

 

Again, thank you very much for suggesting the workaround.

Hi @in2217,

 

If you want the function to nested flows in a flow to be supported in microsoft flow, you could submit an deal to flow idea forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

And although my solution maybe isn't an efficient one, I afraid that this could be an alternative solution and there is no any other better solution currently.

 

Best regards,

Alice

Thank you Alice.

I'll submit the idea as suggested. 

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (871)