cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
macejkoja
New Member

Initializing Variable, but only if does not equal Null

Since Initialize Variable requires to be at the top level, I am unable to include it within a condition. How can make sure the flow does not fail if output is equal to Null? The flow is working as it should by only executing when met, as it shouldnt do anything if the value is Null anyways, but i'd like to at least stop the "failures".

 

essentially, i need the envelope ID of the doc sent out input into an azure field. i only need it if it was sent out, which is why im wondering how/if i can build the condition into the variable

 

Flow Setup:

macejkoja_0-1652469886237.png

macejkoja_1-1652470335561.png

 

Results with value:

macejkoja_2-1652470502468.png

 

Is there another way to achieve this same result from the array without a variable, or a way to add a condition into the variable to still succeed if Null?

 

Thank you in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
macejkoja
New Member

thank you - i figured it out. since the variable was dependent on whether an envelope was sent or not, i wouldve needed for it to be blank, then append variable within the condition. however, this caused more issues as append requires array or string, so if i was going to convert to one of those, i would prefer to just use a different solution. ended up using string and substring to extract the data. much simpler in the end rather than trying to make the variable work

macejkoja_0-1652974744225.png

 

View solution in original post

2 REPLIES 2
VictorIvanidze
Community Champion
Community Champion

You have to initialize all variables before any action. 

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.
macejkoja
New Member

thank you - i figured it out. since the variable was dependent on whether an envelope was sent or not, i wouldve needed for it to be blank, then append variable within the condition. however, this caused more issues as append requires array or string, so if i was going to convert to one of those, i would prefer to just use a different solution. ended up using string and substring to extract the data. much simpler in the end rather than trying to make the variable work

macejkoja_0-1652974744225.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,596)