cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Reknaw
Helper I
Helper I

If a SharePoint List Item is Equal to - Power Automate Condition is ignoring me

I've created a flow that works off an MS Form and Imports it to a SharePoint List. It has been built as such:

  • When a Response is Submitted
  • Get response details
  • Get SP Items (this then looks at the email address using the Filter Query)
  • Check Email Exists
    • No, add to list.
    • Yes, Check if "Account Status" is equal to "Off-Boarded"
      • Yes, Update Item to "Re-Add User"
      • No, Send an email to let them know they already exist.

The issue I am having is the last Yes, Check if "Account Status" is equal to "Off-Boarded". It just goes straight to if the email exists as "Off-Boarded". What is the best way to set this up?

Annotation.png

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous 

 

No, unfortunately (although I did try that at one point.

I get form response, get SharePoint Items, Apply to each: Condition - Check User exists, (no apply to each here, is that ok?) Condition - Check if Off-Boarded.

I'm pretty sure I also tried it with the added apply to each too.

Instead of "Account Status is equal to Off-Boarded" there is also a "Account Status Value".

OMG... I tried doing this yesterday and it said I needed to do something... But now it lets me and IT WORKED!!!

Thanks guys for all your help.

 

So, for future reference, use the VALUE!

View solution in original post

11 REPLIES 11
RobElliott
Super User
Super User

@Reknaw waht is your condition? Could you do a screenshot Rob
Los Gallardos
of that?

 

 

 

Anonymous
Not applicable

make sure you're not quoting "Off-Boarded"... it should be entered in the right side of the condition box as    Off-Boarded

The Flow action will automatically quote it for you.

@RobElliott - Screenshot of the condition attached.

I even tried adding "And Email is equal to email" and adding the Get Items again before it.

Annotation 2020-06-17 185520.png

@Anonymous - I did try it as one of my options, but it didn't help. So I dropped it. See my other reply for screenshot.

Anonymous
Not applicable

OK. go to your latest failed run log, and find an action where you can examine the content of the comparison field [Account Status] to see what it contains. You're expecting it to contain  Off-Boarded  (or not) but just check.

 

If you havent got an action you can check, Init a new variable just before the condition and set it to the content of [Account Status], run the flow and check that.

 

It will at least help you to see the data you're comparing "in the format that Flow is using it".  Good Luck.

Thanks @Anonymous , but the issue is, it doesn't fail. In my initial screen shot, you see it runs successfully, but ignores my condition. I fear I have created it incorrectly. Do I need to point it to the correct List ID first?

I'm open to test out anything...

Anonymous
Not applicable

It doesnt matter if it fails or succeeds. The suggestion to debug will work anyway.

Add in a variable that you can inspect after a run completes (failure or succes). Set it to the comparison value. Execute the flow. look at the variable's value in the run log...  is it in the format you are expecting?  If not alter your condition accordingly. 

Otherwise post some pages and I'll take another look.

Ahhh, I get you now @Anonymous . The variable ran perfectly and gave me this:

{
  "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
  "Id": 2,
  "Value": "Off-Boarded"
}

 I would also like to point out, this still goes the same way if the status is not set to "Off-Boarded".

I have also tried contains, instead of is equal to.

Anonymous
Not applicable

this is an object not a string variable by the looks of it.

In you earliest screenprint you were using AccountStatus... how is this field defined in SharePoint? eg: "Single line of text" ?

 

For some reason you're getting the whole object definition returned rather than just the value field.

 

I havent seen this before and am not sure how I can recreate it.

Anonymous
Not applicable

Oh! Are you doing...

 

Get Sharepoint Items

Apply to each

  Get Sharepoint Item

 Condition If Account Status= blah blah...?

 

That might cause this... 

 

@Anonymous 

 

No, unfortunately (although I did try that at one point.

I get form response, get SharePoint Items, Apply to each: Condition - Check User exists, (no apply to each here, is that ok?) Condition - Check if Off-Boarded.

I'm pretty sure I also tried it with the added apply to each too.

Instead of "Account Status is equal to Off-Boarded" there is also a "Account Status Value".

OMG... I tried doing this yesterday and it said I needed to do something... But now it lets me and IT WORKED!!!

Thanks guys for all your help.

 

So, for future reference, use the VALUE!

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,860)