Franco Pettigrosso
Franco Pettigrosso

Reputation: 4278

How do I correctly use Microsoft flow conditionals with a YES/NO Columnin A sharepoint list?

I have a Sharepoint list that I have created for testing purposes only. What I am testing is sending an email with different content based on a conditional in a Microsoft-flow process. The conditional looks at a Yes/ No column called Test_YES_NO_DEFAULT_YES. As the name implies, that column always sends back a YES. The process works fine, but the conditional always sends back the IF NO in the email. This is what the flow looks like! enter image description hereI have had tried 1, True, TRUE, true, yes, Yes, and YES with no results. What do I have to do In order for the conditional to execute the IF YES?

Upvotes: 1

Views: 7124

Answers (3)

Judi
Judi

Reputation: 1

Since your column is a boolean, you need to convert your 'true' to a boolean via the bool() function.

Using your example, this should work for you: @equals(triggerBody()?['Test_YES_NO_DEFAULT_YES'], bool(1))

MS Flow is built on top of Logic Apps, so for more info, check out the functions section here: https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

Upvotes: 0

Damjan Tomic
Damjan Tomic

Reputation: 390

Click "Edit in advanced mode", and enter this in the text field:

@equals(triggerBody()?['Test_YES_NO_DEFDAULT_YES'], true)

Please double check the name of the column (I took the one from your screenshot).

EDIT: Note that this is not the same as you tried (true), since writing "true" in Basic mode puts the string in the formula, instead of the bool value true.

Upvotes: 3

Sanjeev Gautam
Sanjeev Gautam

Reputation: 363

You can use SharePoint designer workflow for checking the condition.Once item is created trigger the workflow to check for your condition. Content of mail you can store in SharePoint list. SharePoint designer workflow have many options for checking the condition for the workflow.

Sanjeev

Upvotes: 0

Related Questions