• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

  • Important: Any reported problems and issues with your integration will be reported to you and we will encourage the app developers help to resolve those integration issues.

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: 195
  • 1688983429180.png
    1688983429180.png
    54.1 KB · Views: 190
  • 1688983672340.png
    1688983672340.png
    19.1 KB · Views: 181
  • 1688983800612.png
    1688983800612.png
    31.3 KB · Views: 196
Last edited by a moderator:
Status
Not open for further replies.
Top