cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
stackedcreative
Level: Powered On

Flow update field once another field is no longer blank

I created a flow that when an item in a list is modified and a specific field is no longer blank, the flow updates another field and sends an email.  I want it to then stop, but the email keeps being generated, repeatedly.  How can I make it stop after the initial modification to that field?

 

2019-12-15_16-02-36.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Flow update field once another field is no longer blank

Hi,

Hi,

 

You are executing the flow every time the item is modified. You are also modifying the item with the flow so it will constantly repeat.

 

Do the following:

1) Create Column "StartFlow" Single Line of Text set default value to "Yes"

2) On the trigger click the ... go into the settings and set the following start condition 

 

@and(equals(triggerBody()?['StartFlow'],'Yes'), not(empty(triggerBody()?['Lead_x0020_Ope...yourfieldhere'])))

 

You may need to tweak it a bit, but this basically says - run if StartFlow = Yes and Lead field is not empty.

 

3) Move actions outside of the condition

4) delete the condition

5) update the update item function to set StartFlow = No

 

Cheers

 

Chris

 

 

View solution in original post

8 REPLIES 8
Super User
Super User

Re: Flow update field once another field is no longer blank

Hi,

Hi,

 

You are executing the flow every time the item is modified. You are also modifying the item with the flow so it will constantly repeat.

 

Do the following:

1) Create Column "StartFlow" Single Line of Text set default value to "Yes"

2) On the trigger click the ... go into the settings and set the following start condition 

 

@and(equals(triggerBody()?['StartFlow'],'Yes'), not(empty(triggerBody()?['Lead_x0020_Ope...yourfieldhere'])))

 

You may need to tweak it a bit, but this basically says - run if StartFlow = Yes and Lead field is not empty.

 

3) Move actions outside of the condition

4) delete the condition

5) update the update item function to set StartFlow = No

 

Cheers

 

Chris

 

 

View solution in original post

stackedcreative
Level: Powered On

Re: Flow update field once another field is no longer blank

Thanks, Chris.  This is my first time using triggerBody code, so, please bear with.  I haven't  been able to get this to work yet.

 

I updated the code to match my field name: 
@and(equals(triggerBody()?['StartFlow'],'Yes'), not(empty(triggerBody()?['Lead Operator Assigned BY PROD CLERK'])))

 

I followed the capitalization in the field name to be sure.

 

Clicked … next to the "When an existing item is modified" > Settings and added to the code to the bottom: 

1.jpg

 

2.jpg

3.jpg

 

The status doesn't changed to Assigned, StartFlow doesn't change to No, and no email is generated.  What am I doing wrong?

 

Thanks!

 

 

 

 

 

stackedcreative
Level: Powered On

Re: Flow update field once another field is no longer blank

Hi @Gristy - any ideas on my previous reply?  I'm still in a holding pattern.  Had major issues with gateways due to a Microsoft server issue and am now back in play on this.  Any ideas you have- I welcome!

Super User
Super User

Re: Flow update field once another field is no longer blank

are you saying that the flow does not ever trigger?

 

The expression looks OK, StartFlow will need to be Yes and the other value not empty for it to work.

stackedcreative
Level: Powered On

Re: Flow update field once another field is no longer blank

Correct.  I changed it so Startflow=Yes and it still doesn't generate an email.  😣

Super User
Super User

Re: Flow update field once another field is no longer blank

Hey

Looking at your screenshow you have used a Yes/No field is that correct?

 

In that case it would be this:

 

@and(equals(triggerBody()?['StartFlow'],true), not(empty(triggerBody()?['Lead Operator Assigned BY PROD CLERK'])))

stackedcreative
Level: Powered On

Re: Flow update field once another field is no longer blank

Hi!  It is single line of text, default to Yes.

2020-01-09_9-34-00.png

2020-01-09_9-35-06.png

It states that it hasn't run in several days.  It isn't being triggered.

2020-01-09_9-36-09.png

 

stackedcreative
Level: Powered On

Re: Flow update field once another field is no longer blank

I decided to go a different route and just create 3 separate flows that fire off as they should, but require a little manual entry by the people involved in the approval to keep it going.   This works for us for now, so I will hold off on trying to fully automate.  Thank you.

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,168)