Discussion Board for collaboration on QlikView Scripting.
How can I elegantly trigger an error in the script when a condition is not met?
I do not want to exit the script without an error because then I would not get a warning in the Publisher...
Go to Solution.
IF condition then TRACE( Condition is not valid); SET TriggerError; //This line of code triggers an error END IF
My preferred technique: use the CRASH; statement. It doesn't exist but it will do what it says...
Maybe something like this:
if condition = false() then
Load * Resident NotExistingTable;
IF Condition Not met,
trace 'This condition has not been met!';
You can use any word that is not a command
If 1 <> 0 then
Will work but not the most elegant one
Thanks for the feedback. But this will not trigger an error in my mgmt console.
Will it find the endif statement?
That is genial!