Boolean test doesn't work as I expect

HI,

I have this function in a Set Variables module:

{{if((14.missing_events_next_6_weeks + "= " + true); "Missing events."; "All events present")}}

Yet, with this incoming data, I get “Missing events” as a result. What’s wrong with my function?

[
    {
        "upcoming_toolboxes": [
            {
                "date": "2025-03-05",
                "toolbox_with_no_title": false
            },
            {
                "date": "2025-03-12",
                "toolbox_with_no_title": false
            },
            {
                "date": "2025-03-19",
                "toolbox_with_no_title": false
            },
            {
                "date": "2025-03-26",
                "toolbox_with_no_title": true
            },
            {
                "date": "2025-04-02",
                "toolbox_with_no_title": false
            },
            {
                "date": "2025-04-09",
                "toolbox_with_no_title": true
            },
            {
                "date": "2025-04-16",
                "toolbox_with_no_title": true
            },
            {
                "date": "2025-04-23",
                "toolbox_with_no_title": true
            },
            {
                "date": "2025-04-30",
                "toolbox_with_no_title": true
            },
            {
                "date": "2025-05-07",
                "toolbox_with_no_title": false
            }
        ],
        "missing_toolboxes_next_4_weeks": false,
        "upcoming_events": [
            {
                "date": "2025-03-19"
            }
        ],
        "missing_events_next_6_weeks": false
    }
]

In the execution history I see:

image

Yet the result acts as if the value is true.

L:

Never mind. I see that I wasn’t using the correct string for "= "… Ah, what lack of sleep does to one’s brain!

L

2 Likes