Bool() Not Outputting Custom Values

Greetings,

I'm working with Plumsail Documents via a direct call from PowerAutomate and I'm trying to use the bool() filter to output custom text instead of true or false.

My template line looks like this:

{{ engagement.displayOptions.showResult | bool(yay, nay) }}

My payload structure is:

{
  "engagement": {
    "displayOptions": {
      "showResult": true
    }
  }
}

The boolean itself resolves correctly — I get true when the value is true and false when it's false.

But no matter what I try, the custom text (yay / nay) never appears. The output is always the literal boolean.

I'm expecting to see:

yay

…but I keep getting:

true

Has anyone run into this? What’s the correct way to get bool() to output custom text?

As an alternative, I tried using {{prop}:checkbox}, but I don’t think that works when the template is generated through a Power Automate request. Open to any suggestions!

Hello @pointmanbx ,

The issue is most likely caused by using the Modern engine instead of the Classic one. Please try to use the following template, it is designed for the Classic engine:
{{engagement.displayOptions.showResult}:bool(yay, nay)}

If this doesn’t help, could you please let me know which Plumsail connector you’re using in Power Automate? This will help me investigate the issue further.

Best regards,
Aleksandra
Plumsail team

Thank you @Aleksandra, that was the issue. And to get my checkbox, I just used unicode characters to achieve the same effect.

{{engagement.displayOptions.showResult}:bool(☒,☐)}

1 Like

Hi @pointmanbx ,

Perfect! I’m so glad to hear everything is working now!

Best regards,
Aleksandra
Plumsail team