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

MS Flow IF statement

Hi All,

I am new to MS Flow and I am having issues with the syntax of the If expression. The scenario is as follows:

  1. I am making use of the Add a row into a table Action.
  2. I have 2 fields named Cost Element and Posting Key.
  3. If the Cost Element field is not blank I want to set the Posting Key to 40, else the Posting Key should be blank.

Is the IF statement the correct way to go about this? If so what will the correct syntax be?

Thanks in advance for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @MV23,

 

Do you want to update the value of field Posting Key based on whether the field Cost Element is empty or not?

I have made the following test, please check it for a reference.

It is triggered by When an item is created.

Add a row into a table. Select dynamic content Title for the field CostElement.

Then update a row to update the PostingKey using the following code:

if(not(empty(body('Add_a_row_into_a_table')?['CostElement'])),40,'')

Image for your reference:

1.PNG

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yamao-msft
Community Support
Community Support

Hi @MV23,

 

Do you want to update the value of field Posting Key based on whether the field Cost Element is empty or not?

I have made the following test, please check it for a reference.

It is triggered by When an item is created.

Add a row into a table. Select dynamic content Title for the field CostElement.

Then update a row to update the PostingKey using the following code:

if(not(empty(body('Add_a_row_into_a_table')?['CostElement'])),40,'')

Image for your reference:

1.PNG

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,395)