NAl
4 years agoContributor
Expression for Router
I have a Router snap which evaluates whether an ID exists for records returned in a Salesforce Read Snap. Some of these have an ID, others do not.
Right now in the Router snap I have an expression ...
- 4 years ago
Hi @NAl,
You can do this with the .get() method. The first parameter you pass to this method is the field you are looking for, and the secondary parameter is optional - you pass the value you want to be returned if the field you are looking for it’s not found, just like in your case.
So instead of checking with
$Id != null
, what you can do is$.get("Id", null) != null
. In this case, even if the “Id” is not present in the input document the expression will evaluate to false.