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

Global variable for flows

Hello, 

 

I am using a dozen of flows that all use the same condition string. This condition filters e-mails based on characteristics. New insights lead to modifying the condition which I have to then copy into 12 flows.


Is it possible to create a global variable containing this string which I can call from the condition element in my flows? 

 

Regards, Sander

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @sanniep,

If you are looking for global varibales acrossmultiple flows then I would recommend storing the data that you are looking for somewhere central outside the flows. e.g. SharePoint list. This also has another benefit. Imagine that you want to update this variable (actually it sounds like this is a constant ratehr than a variable)? Then all you have to do is update the avriable in a single place and all flows willpick up the value.

View solution in original post

6 REPLIES 6

Hi @sanniep,

If you are looking for global varibales acrossmultiple flows then I would recommend storing the data that you are looking for somewhere central outside the flows. e.g. SharePoint list. This also has another benefit. Imagine that you want to update this variable (actually it sounds like this is a constant ratehr than a variable)? Then all you have to do is update the avriable in a single place and all flows willpick up the value.

View solution in original post

Hey @sanniep

 

 

What @Pieter_Veenstra says seems to be the correct way to "make" global variables in Flow.

As of today there is no option to create global variables you can use across multiple Flows.

 

Kind regards

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

Regular Visitor

Can you help me with another piece of this puzzle? So, I've got the constant (you're right) loaded into a variable called 'condition':

 

@or(contains(toupper(triggerBody()?['Subject']), 'FACTUUR'),contains(toupper(triggerBody()?['Subject']), 'REKENING'),contains(toupper(triggerBody()?['Subject']), 'INVOICE'),contains(toupper(triggerBody()?['Subject']), 'RECHNUNG'),contains(toupper(triggerBody()?['Subject']), 'FAKTUUR'),contains(toupper(triggerBody()?['Subject']), 'FAKTUREN'),contains(toupper(triggerBody()?['Subje.... etc

 

But how do I call this string as a condition? Thanks again.

 

Screenshot_4.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Regards, Sander

Hey @sanniep

 

 

You shouldn't put the whole condition in your variable, only the things that occur more frequently like

contains(toupper(triggerBody()?['Subject']))

variables1_Flow.PNGvariables_Flow.PNG

 

Hope this helps.

 

Kind regards

 

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

Thanks, @Tom_Slosse

 

Well, I am new with flow so I am learning. But I've got 12 flows using the same conditions. This one and another for negative keywords.

What I want to do is manage the positive and negative keywords centrally so I don't need to update all flows everytime we think of a new keyword.

 

So I use a Sharepoint list to manage the 2 conditions thanks to the advise in this post. But it are the keywords I want to centralize for easy management, the redundancy in expressions is not that my concern at this point.

 

Maybe there is another way to check the email subject and body for a set of keywords. I thought loading the expression from a global variable like this was most efficient.

Hey @sanniep

 

I understand your thinking but in a condition something needs to be evaluated if its true or false.

A single variable wouldn't do it so even if that variable contains your condition. The condition will take your variable as just text.

So I think you can't put your whole condition in a variable

 

Kind regards

 

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (91,586)