1
Discussion | Обсуждение / Re: Print if not empty?
« on: July 28, 2016, 02:14:27 pm »
Thanks!
Now the next issue
We can now quiet warnings for missing fields, but I did not find a way to give fallback values.
When a field is missing, it seems the custom script exit instead of simply return null value for the queried field:
The data source Marcel and the field pagnol does not exists, though I have declared a custom variable Marcel.pagnol.
What I want is to fallback to my custom variable if the data source field does not exists.
Actually this throw: SyntaxError: Parse error
Any ideas ?
EDIT: In the end it does just works! I was missing the quotes around the variables.
Now the next issue
We can now quiet warnings for missing fields, but I did not find a way to give fallback values.
When a field is missing, it seems the custom script exit instead of simply return null value for the queried field:
Code: [Select]
$S{
"$D{Marcel.pagnol}" === "" ? "$V{Marcel.pagnol}" : "$D{Marcel.pagnol}"
}
The data source Marcel and the field pagnol does not exists, though I have declared a custom variable Marcel.pagnol.
What I want is to fallback to my custom variable if the data source field does not exists.
Actually this throw: SyntaxError: Parse error
Any ideas ?
EDIT: In the end it does just works! I was missing the quotes around the variables.