Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
bismart
Creator
Creator

Problem setting variable to value of field

Hi

I want to set a variable to the value of a field and exit script if condition is not met.

Problem I notice when running in debug is that vBuild variable ends up as a NULL value

Anybody see where I'm going wrong?

Thanks

Dave

// Sample

SET vBuild = RunNBF;

ValidityCheck:
LOAD
     RunNBF
FROM
$(vMap)QVD DataLoader\QWIN_RunStatus.qvd
(qvd);

LET vBuild = RunNBF;

// Exit if Not right to rebuild
IF $(vBuild) <> '0' then
EXIT Script;
ENDIF

1 Solution

Accepted Solutions
Not applicable

Hello Bismart,

you should use the peek()-command to get the according value, similar to this:

LET vBuild = Peek('RunNBF');  // don't forget the single quotes

TRACE --> $(vBuild)    ;

Note: The TRACE-Command shows you the value in script execution output window.

HtH

Roland

View solution in original post

2 Replies
Not applicable

Hello Bismart,

you should use the peek()-command to get the according value, similar to this:

LET vBuild = Peek('RunNBF');  // don't forget the single quotes

TRACE --> $(vBuild)    ;

Note: The TRACE-Command shows you the value in script execution output window.

HtH

Roland

bismart
Creator
Creator
Author

Thanks Roland

mental block... Peek works a treat