cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: MS Flow IF statement

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
Highlighted
Community Support
Community Support

Re: MS Flow IF statement

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Users online (7,212)