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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Binary Load(urgent)

Is it possible to do a conditional binary load based on the value of a variable.

Ex: if(v1=0, binaryload1, binaryload2)

5 Replies
thomas_skariah
Creator III
Creator III

Hi,

You can use the following code.

BINARY $(vbinary);

let vbinary = if(vtest=1,'C:\Documents and Settings\My Documents\Qlikcommunity\test3.qvw',

'C:\Documents and Settings\My Documents\Qlikcommunity\test2.qvw');

Use a input box at front end whether you want 1 or 0

Regards,

Tom

Not applicable
Author

Thanks Tom for the Reply. If u can post a qvw file showing the implementation, then it would be really helpful.

Not applicable
Author

Hi,

It loaded the file corresponding to vtest<>1.

How to make vtest=1 ?

tried declaring a variable in front end with name vtest bt no use.

Regards

thomas_skariah
Creator III
Creator III

Hi,

Please find the attached application.

Regards,

Tom

hugmarcel
Specialist
Specialist

Hi

you can also do a conditional binary load in this way:

1.) In the GUI,define a variable vBinaryLoad with value "BINARY 'mytable.qvw';" (without double-quotes)
2.) As first script command write $(vBinaryLoad)
3.) Change vBinaryLoad anywhere and your load will be conditional.

Marcel