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.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,977)