• Resolved giangel84

    (@giangel84)


    Hello,
    is there a way to force a mapped field to be treated as boolean?
    Example:
    I have a field “checkbox” on my form, when I map that field on the custom API it send all fields as string.
    Sometimes the endpoint expect some fields are exactly { : true } instead of { : “true” }.

    Any suggestion would be very appreciated.
    Thank you in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support abrarfaisal87

    (@abrarfaisal87)

    Hi @giangel84 ,

    Thank you for sharing the details of your question.

    Currently, Bit Integrations does not have a built-in option to convert string values to boolean directly. However, you can achieve the desired result by creating two separate integrations and using custom values along with conditional logic.

    Here’s how you can do it:

    1. First Integration:
      • Map your checkbox field and set a custom value of 1 to represent true.
      • Add a conditional logic rule: Run this integration only if the checkbox is selected (true).
    2. Second Integration:
      • Map the same checkbox field but set a custom value of 0 to represent false.
      • Add a conditional logic rule: Run this integration only if the checkbox is not selected (false).

    For example, if a user submits the form with the checkbox selected, they can be added to List A. If the checkbox is not selected, they can be added to List B.

    Let me know if this solution works for your setup.

    Thread Starter giangel84

    (@giangel84)

    @abrarfaisal87 Thank you, this could be a solution but it’s applicable only when you have a single field to treat as boolean…otherwise you need to build a lot of conditions.

    I hope you could take this case as a feature request, in order to improve your plugin in the next future.

    Thank you.

    Plugin Support abrarfaisal87

    (@abrarfaisal87)

    Hi @giangel84,

    Thank you for your suggestion, we have added this as a feature request, if we get more user requests for this, we will definitely add it. We have a different product where we have the functionality to change the String values to boolean values.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Force field as boolean’ is closed to new replies.