Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
greend21
Creator III
Creator III

IF field = True THEN load script?

I want an to use an IF statement in my load script that checks if our database load is done before Qlik runs a loader. I have the SQL query check if the load is done and return true for [LoadComplete]. I then had my IF as  IF(LoadComplete = 'True') THEN followed by my load script. LoadComplete can only have one value and it must be true or false. Any ideas on how I can get this to work? I also tried IF(Peek(LoadComplete) = 'True') THEN.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

How does your script look like?

edit:

Maybe like this

// Script to load field LoadComplete into table Check

...

//

Let vCheck = Peek('LoadComplete',0,'Check');

TRACE $(vCheck);

IF vCheck = 'True' THEN

// other LOAD statements

ENDIF   

View solution in original post

2 Replies
swuehl
MVP
MVP

How does your script look like?

edit:

Maybe like this

// Script to load field LoadComplete into table Check

...

//

Let vCheck = Peek('LoadComplete',0,'Check');

TRACE $(vCheck);

IF vCheck = 'True' THEN

// other LOAD statements

ENDIF   

ahmar811
Creator III
Creator III

try


Qlikview ScriptError variable also find below link for more details and examples.


https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ErrorVariables...

Regards

Ahmar