Adaptive Card- Boolean value in Condition

Options

I'm trying to put a condition on a value from my adaptive card. If the value = true, then do this.

I have an adaptive card that asks “Do you want to make this fundraiser former?" There is a box that says Yes. I have the boolean values set to True if checked. Json below.

{
"type": "Input.Toggle",
"title": "Yes",
"label": "If there is a Current Fundraiser listed, make Former?",
"id": "FormerYes",
"valueOn": true,
"valueOff": false
},

When it's returned I have it set to the property boolean.

"properties": {

"FormerYes": {

"type": "boolean

Here is the condition, it always returns false. I don't know what else to try. I've tried string and just typing true, I tried ‘true’ when it was a string.

b67bcd9ec71cfd1ac8bdb5dbfc5ed168-huge-im

Any ideas here?

Thanks,

Carol

Comments

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary 1,500 Likes 2500 Comments Name Dropper

    @Carol Grant
    you need to look at a run history of the flow when you “submit” the adaptive card, then look at the trigger output and see how the parameter is passed. Then do the right compare.

    if you still have issue, copy and paste the trigger output here.

  • I did get this figured out if anyone has this issue. You have to bring the value over as a string into the other flow. It won't take the field as a boolean as I mentioned.

    Then you have to convert it to a boolean in a Compose in the flow like this example.

    equals(triggerBody()?['myToggle'], 'true')

    Then use this Compose in your Condition.

    I have to give some credit to ChatGPT for this answer. LOL

Categories