These are a few ways to format values during merge, but by default, TBS converts data items to strings using an implicit PHP conversion.
Thus, true converted to '1', and false converted to '' (empty string).
For a nonexistent value: If the key in the array that you want to combine does not exist, you can avoid the TBS error message using the noerr parameter, and the replacement value is '' (empty string).
So your solution:
[test.ativated;noerr;if [val]=1;then 'Activated';else 'non-activated']
source share