Building integrations

Why are empty, zero or numeric values mapped wrongly in my integration?

Turn on the option to stop sending NULL values, map a dummy value to clear a field, and convert text to numbers with a formula before mapping.

Fix

Short answer: By default, an empty mapped field is sent as NULL and can overwrite existing data. Turn on the option to stop sending NULL values, and convert text to numbers with a formula when the target field expects a number.

Why it happens

When a mapped source field is empty, the action sends NULL for it, which clears the value in the target. A currency value of 0 is also treated as empty, so it can show as blank, for example in an email. Values that arrive as text stay text unless you convert them.

How to fix it

Empty fields overwrite data

  1. Open the action in the integration, for example an HTTP connector call.
  2. Select the checkbox Stop sending NULL values when mapped fields are left empty, just above the Next button. The HTTP and SOAP connector docs describe this checkbox; not every action shows it.

You want to clear a value on purpose

To clear a value, for example a board item's due date, map an empty text field or a dummy value. Empty fields aren't offered for mapping otherwise.

A currency of 0 shows blank

Build the display value with a formula that returns $0 when the amount isn't above zero:

if(currencyFromText(context.Trigger_X.Currency_2).value()>0, concatenate("$", currencyFromText(context.Trigger_X.Currency_2).value().totext()), "$0")

currencyFromText works only in integration configuration forms. See Number and currency expressions.

A text value must go into a number field

Convert it with Number(context.Trigger_X.FieldName), or change the field type at the source.

If you use Make an HTTP call (POST)

This action sends body values as strings. One workaround is to add a computed number field on the form and map that. No built-in fix to send the body values as numbers has been confirmed. See HTTP connector.

Related answers