• ⚠️ Important: This forum is being discontinued.

    We've moved community discussion to a new platform — better search, faster replies, and tighter integration with the Pabbly apps you already use.

    • Sunset date: 23 July 2026 (this forum will go offline after that)
    • Until then: Login remains available for 30 days
    • Continue the conversation: https://sales.pabbly.com/forum

How to use boolean() prefix in JSON

Status
Not open for further replies.

What is boolean() prefix​


The boolean() prefix is an advanced built-in function that is used to convert a value mapped inside it into a boolean format. This prefix is commonly used in request JSON when a
  • Static dropdown values need to be converted into the boolean format e.g. true or false.

    1688983720835.png


  • Need to remove key from JSON if don't want to pass boolean value.

    1688983896279.png
For instance, consider the following example:
JSON:
{
    "name": "{{name}}",
    "email": "{{email}}",
    "additional_info": {
        "is_married": "boolean({{is_married}})",
        "age": "numeric({{age}})"
    }
}

In this JSON, the is_married is enclosed in the boolean() prefix to convert them to boolean format:
JSON:
{
  "name": "mahesh",
  "email": "[email protected]",
  "additional_info": {
    "is_married": true,
    "age": null
  }
}

Using the numeric() prefix can ensure that certain values are always returned in boolean format.

How to Use numeric() prefix:

In the given example API endpoint requires the value of is_married in boolean format. So I'll map is_married inside numeric() prefix like this -
1688984506677.png


In the workflow page when the user will select is_married value -

1688984436038.png


I'll get is_married in the boolean format like this -

1688984297365.png



Note:-
  • Avoid using {{##boolean:true##}} or {{##boolean:false##}} when using Pabbly custom fields. Instead, use 'true' or 'false' in a static dropdown
 

Attachments

  • 1688983360961.png
    1688983360961.png
    53.9 KB · Views: 322
  • 1688983429180.png
    1688983429180.png
    54.1 KB · Views: 314
  • 1688983672340.png
    1688983672340.png
    19.1 KB · Views: 301
  • 1688983800612.png
    1688983800612.png
    31.3 KB · Views: 316
Last edited by a moderator:
Status
Not open for further replies.
Top