cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CW
Advocate V
Advocate V

IF Expression in Flow

Hi. I'm not sure about the syntax of the If expression, can't find any useful docs in MSFT.

  1. I'm creating an HTML data from SPO list data
  2. Set up my Headers (columns) and just use the 'Get Items' output for the values as seen in the image
    IF.png
  3. The Setlist column is from a SPO Yes/No field so shows up as True or empty.
  4. What I'd like is to change the True values to something less utilitarian such as Y or Yes.
  5. I tried an if expression but I keep getting errors. The statement is below, but gives an error:
    IFa.png
  6. Something tells me my objects are all wrong but as I said, I can't find useful documentation anywhere.

Thanks


  

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @CW ,

the reference to the 'Setlist' in your expression is wrong. If you're trying to compare the value in 'Setlist' with 'True' you'll reference it only using item()?['Setlist']. You don't reference the original action's output, that one is already defined in the From field of the 'Create HTML table' action.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

3 REPLIES 3
tom_riha
Super User
Super User

Hello @CW ,

the reference to the 'Setlist' in your expression is wrong. If you're trying to compare the value in 'Setlist' with 'True' you'll reference it only using item()?['Setlist']. You don't reference the original action's output, that one is already defined in the From field of the 'Create HTML table' action.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Thanks Tom!!!!!!!

That did the trick. Is it me or is there literally no useful documentation on when to use the long drawn out version that I started with or does one learn through osmosis or using 'The Force'??
This is what worked for me after a few tests:

if(equals(item()?['Setlist'],True),'Yes','')

 

Hi Tom. Checked out your Blog. Great resources, thanks.

Carl

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,171)