web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need to set up an cond...
Power Automate
Answered

Need to set up an conditional expression within an If-Action

(0) ShareShare
ReportReport
Posted on by 10

Within my For Each-Loop I have set up Power Automate to iterate through an Excel Spreadsheet. Now I have trouble to make Power Automate to check, if the word "false" (or otherwise "FALSE") exist in a column. I have Power FX enabled and I tried it with the conditional Expression =FALSE but it put out an error, where it says "Name isn't valid, Name isn't recognized". When I try it with small captions =false there is no error but it won't find the expression.

Capture.PNG
I have the same question (0)
  • eetuRobo Profile Picture
    4,507 Super User 2026 Season 1 on at

    Your condition is now just saying: IF false THEN true

    So there is no variable If what is false then true.

    In Power Fx the syntax goes like this: =If(VariableToCheck = false, true)

    eetuRobo_0-1709186082745.png

    So If VariableToCheck is false then If condition is true and flow continues inside that condition.

     

    Also in PowerFX booleans are in lower case.

  • Virtzdmp Profile Picture
    10 on at
    Thank you for the reply, but the issue still consists. I will post a simplified excel screenshot to show what I am looking for. The easiest way in the given example (screenshot) would be to check, if one of the rows within Column C (or 3 in Power Automate) contains the expression "FALSE", but I can't get it to work. Maybe because "FALSE" is a boolean keyword? I want to get a display message, everytime a row contains a mismatch. Hopefully I made myself comprehensible.
    Capture.PNG
  • eetuRobo Profile Picture
    4,507 Super User 2026 Season 1 on at

    Hmm the syntax in PowerFx preview for PAD is bit lacking and buggy. Not really sure why I cant get the syntax to work when building it that Power Fx mode. 
    How I got it to work was to create If condition in the normal PAD flow (not PowerFx) and then copy pasting it to the Power Fx version. You cant really edit it in the flow though if you do it like this.

    eetuRobo_0-1709287734200.pngeetuRobo_1-1709287776679.png


    Here is the code for you to paste if you want:

    LOOP FOREACH CurrentItem IN $fx'=ExcelData'
    SET VariableFX TO $fx'=CurrentItem.Column3'
    IF VariableFX = $'''False''' THEN
    SET VariableFX TO $fx'Done'
    END
    END


    The If statement alone with referering to the CurrentItem column3:
    IF $fx'=CurrentItem.Column3' = $'''False''' THEN


  • Verified answer
    Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Virtzdmp 

     

    You can also implement the following suggestion (Purely Fx version) to display the mismatched cell values:

     

    Within the forEach loop, utilize the syntax "ReadCell(CurrentItem, 3)" to retrieve the value of your third column.

    Place this value within an if condition to compare it with false. If the third cell is false, a messagebox will display the mismatch.

     

    Deenuji_0-1709288177657.png

     

     

    Code:

    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $fx'C:\Users\Documents\Number_Check.xlsx' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: $fx'=ExcelInstance' ReadAsText: True FirstLineIsHeader: False RangeValue=> ExcelData
    LOOP FOREACH CurrentItem IN $fx'=ExcelData'
    IF $fx'=If(ReadCell(CurrentItem, 3) = false,true,false)' THEN
    Display.ShowMessageDialog.ShowMessage Title: $fx'Alert' Message: $fx'This is Mismatch : ReadCell(CurrentItem, 3)' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
    END
    END

     

     

    ------------------------------------------------------------------------------------------------------------------------

    If I've resolved your query, please consider accepting it as the solution and giving it a thumbs up to help others find answers faster.

     

     

     

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 809

#3
Haque Profile Picture

Haque 645

Last 30 days Overall leaderboard