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

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
Highlighted
Super User II
Super User II

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
Highlighted
Super User II
Super User II

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

Highlighted
Frequent Visitor

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!

 

 

 

 

 

Highlighted
Frequent Visitor

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!

Highlighted
Super User II
Super User II

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.

Highlighted
Frequent Visitor

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

Highlighted
Super User II
Super User II

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'])))

Highlighted
Frequent Visitor

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

 

Highlighted
Frequent Visitor

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

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,261)