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

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

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

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Kudoed Authors (Last 30 Days)
Users online (5,461)