If an object in a record from your export data contains no value, you can use the if/else handlebar block helper to assign a default value.
The following expression checks the object/value pair. If the value exists, it prints the value. If the object has an empty value or the object/value pair isn't present in the export data, you can print a default value (e.g. null).
The statement uses this syntax:
{{#if value}}{{value}}{{else}}null{{/if}}
For more information, see if/else.
Hi @tomsantiago
how about if the export value is an empty string, how could I do it that it will print a black value?
I tried to replace it with a "space" but it still not accepting it.
Hi Romel,
This might be dependent on what the destination (import) record will accept as an empty value. In your example, a space could be considered as a character. You might try instead to omit the space character.
For instance, instead of the following, which contains a space chararcter for the #if statement:
{{#if value}}{{value}}{{else}} {{/if}}
you might instead try this, which omits the space:
{{#if value}}{{value}}{{else}}{{/if}}
If you're using the default mapping tool, you may need to open the advanced options next to the field you're mapping to (the 'gear' icon), and check the "Discard if empty" option as well.
Best Regards,
Dan