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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,705)