Processing of 'empty' Values
This document describes how Make processes mapped values and how the values are passed to a service.
Last updated
This document describes how Make processes mapped values and how the values are passed to a service.
Last updated
The new approach for processing empty values, as described in this document, is applicable only for apps with Apps platform version 2 (apps created after 11/02/2019). Apps with Apps platform version 1 behave according to the old rules due to backward compatibility.
In this approach, almost every input parameter of a module is ignored if there is no value. In the case where the user wants to rewrite(erase) the value of a field in service, the user has to use the erase
keyword. Here is an example of how to erase the values for the Query string and Body fields.
The processing of "empty" values is completely managed by Make. So, the developer doesn't have to implement this in his/her app. Bear in mind though that when an empty value comes to a module, then there was an intent for that and a value still has to be sent to the service.
To further explain the reason for the new processing approach, here is an example. When a user updates a task, and in the module config there is a multiple-select with labels that they leave untouched, it is unclear what action should be performed. Does this mean that they want to leave the task labels unchanged or want to remove all the labels?
The new behavior for parameter processing solves the problem mentioned above. By default, if the user doesn't select any label, Make will ignore the field. If the user wants to remove all assigned labels from the task, they have to use the erase
keyword.
The table below describes how Make evaluates mapped values into the module config:
string
null
undefined
null
string (forced empty string using IML)
""
""
number
null
undefined
null
boolean
undefined
undefined
undefined
array
[]
undefined
[]
multiple select
[]
undefined
[]
select (nothing selected)
null
undefined
select (selected value is""
)
null
undefined
select (selected value is null
)
invalid value
invalid value
select (map mode)
null
undefined
null
collection
not changed (collection of empty values)
Recursively processed corresponding to the rules in this table
Recursively processed corresponding to the rules in this table
erase
Pill is ShownThe Erase
keyword is shown for the update and universal modules.
The type of module is defined in the metadata of a module. A universal module is a module without a defined module action field.