"$PARAMETER != NULL" condition in trigger

15 views
Skip to first unread message

patrik....@gmail.com

unread,
Jan 22, 2024, 8:25:26 AMJan 22
to schedulix
Hello!
I am trying to create a trigger that works only if a specific parameter is not empty.
I was trying with "$PARAMETER != NULL" and some other statements but I didnt find the correct version.
Can you tell me how to write this condition correctly?

Ronald Jeninga

unread,
Jan 22, 2024, 9:21:18 AMJan 22
to schedulix
Hi Patrik,

unfortunately there no bullet proof method yet, but you can use the NVL function to map a NULL to some other value.
(And yes, I've noticed that the NVL function doesn't show up in the documentation; sorry for that).

Something like:

NVL($PARAMETER, "Unknown Value") != "Unknown Value"

would do the trick, unless of course the value of $PARAMETER is likely to be "Unknown Value" if the parameter is set.

Best regards,

Ronald

Ronald Jeninga

unread,
Jan 22, 2024, 10:15:08 AMJan 22
to schedulix
Hi Patrik,

I've found a bullet proof condition to test if some parameter is NULL :-)

NVL($PARAMETER, "A") == NVL($PARAMETER, "B")

If PARAMETER is not NULL, the condition will evaluate to True, because $PARAMETER equals itself, whatever value it has.
If PARAMETER is NULL, the condition will evaluate to False, because "A" != "B".

Granted, these kind of conditions are worth a comment :-)

Best regards,

Ronald

Reply all
Reply to author
Forward
0 new messages