Display inverse value for value formatter checkbox

Hello,

I'm looking to use checkbox value formatter in a template .docx file and want to use a singular token value to control two checkboxes with one showing the inverse of the other.

inputed JSON:

{
"userAcceptsEULA": true
}

Desired output in generated document:

User accepted the EULA
User did NOT accept the EULA

My attempt at using value formatter to do such:

{{userAcceptsEULA}:checkbox} User accepted the EULA
{!{userAcceptsEULA}:checkbox} User did NOT accept the EULA

I've tried a few different versions of using the logical NOT operator (!) to inverse the value of the "userAcceptsEULA" field with no luck. I know a working solution would be to simply pass the inverse value as an additional JSON input field, but I plan to use this many times over in my generated document and would prefer not to go that route.

Is there a known solution to achieve this result?

Thank you kindly

Hi @Alec,

At the moment we can suggest the following workaround:

Use * map formatter with symbols.

The template looks like this

{{userAcceptsEULA}:map(true=☑, false=☐)} User accepted the EULA
{{userAcceptsEULA}:map(true=☐, false=☑)} User did NOT accept the EULA

Insert the symbols into template using Insert - Symbols section in Word

image

After applying the JSON I get this result:

{
"userAcceptsEULA": true
}

image

I attach the template
checkbox-test-template.docx (14.1 KB)

Best regards,
Petr
Plumsail team