cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
Post Prodigy
Post Prodigy

How to confifure a flow to know the "from" value with using a condition

Hi Folks -

 

I am setting up a new flow to notify users that their new code request (after it has been approved) has been imported into the target financial system. To do this, I have a field called "RequestStatus".

 

What I need to do is ONLY trigger the flow when the RequestStatus value goes from "Approved" to "Published".

 

Is this possible? I also use this field for change requests and the values go from "Updated" to "Published" and I obvously dont want the flow to trigger then.

 

Is this possible?

6 REPLIES 6
LeeHarris
Solution Sage
Solution Sage

Hi @simms7400 

Where is the data being updated? If you are using the Common Data Service then you can't trigger the Flow to run when a certain value has been set. It is unlikely that you will be able to see the previous value from the field regardless of your trigger so if you only need to catch scenarios where you go from "Approved" to "Published" you may have to look at an alternative approach.

If you can provide details of where your data is currently held I'm sure someone will be able to come up with an appropriate solution.

 

 

 


Did I answer your question? Mark my post as a solution!

Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

My data sits in a SharePoint List
Mirega
Community Support
Community Support

Hello,

 

as of today the trigger only works for creations or modifications, meaning any modification. Then you would have to filter to see if it should run the flow or do nothing.

 

You can also do it in another way. Customize the sharepoint form with a powerapp where they are editing the item, and have that form trigger the flow when they change that value and submit the form.

 

another way is, if you are using microsoft flow to do the approval, you can also have that flow do the notifications or call another flow that will do them.

@LeeHarris  hmmm thank you.

 

Neither of those options would work for me. Right now, I have a PowerApp that users enter information in. For ew data elements, I have an approval flow set up. Once approved, I then manually go into my Access Database and run a macro which publishes the code to the target applications and sets the RequestStatus from "Approved" to "Published".  However, I also wnt a Workflow to trigger then.

 

I think I may just create another custom column in my SP list and leverage the previous value there in a condition.

Mirega
Community Support
Community Support

@simms7400You can create a flow that can be called from outside. please see this https://flow.microsoft.com/en-us/blog/call-flow-restapi/

Hi @simms7400,

 

You could add a column named PublishSign, set the value as 1 or 0, the default value is 1, so that it will be four status of RequestStatus:Annotation 2019-06-26 162533.png

  • If RequestStatus value is "Approved", and PublishSign value is "1", it represents the state of the new code request has been approved, but have not be published;
  • If RequestStatus value is "Published", and PublishSign value is "1", it represents the state of the RequestStatus is going to change value "Approved" into "Published", but it have not been published;
  • If RequestStatus value is "Published", and PublishSign value is "0", it represents the state of the new code has been published;
  • If RequestStatus value is "Approved", and PublishSign value is "0", it represents the state of the invalid;

 

Each time you modified or create items , the trigger will work, but the next action will run after determine the status of RequestStatus and PublishSign. This way you don't have to worry about triggering flow by changing the value of other columns when RequestStatus is "Published".

After you publish the code, you need to set the PublishSign value as "0" by using action Update item;

If you want to republish the code, you need to set the PublishSign value as "1".

Annotation 2019-06-26 161037.png

Best Regards,

 

 

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,586)