Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Binary load based on documentpath()

Hello all,

I have split my development & production environment. When I copy a QV app from DEV to PROD then the binary load should know which data model (development or production) to use (see attachment for folder structure):

DocumentPath() like '*\Formeel*' then

Binary [..\..\..\5_datamodel\sales\formeel\dm_sales.qvw];

else

Binary [..\..\..\5_datamodel\sales\informeel\dm_sales.qvw];

end if

Needless to say this doesn't work else I would not post this . Who can help me?

Thanks in advance,
Marcel

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Not sure if I understand your limitation. I don't think the included script file needs to be in the same directory.

You just need to create a script file with the binary statement once for DEV, once for PROD, and have the UI QVW use a relative path to that qvs.

View solution in original post

9 Replies
Clever_Anjos
Employee
Employee

Can´t do that

Binary command MUST be the very first command

jonathandienst
Partner - Champion III
Partner - Champion III

Binary must be the first executable statement in the script, so I don't think that is possible. Perhaps someone has a smart workaround?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
swuehl
MVP
MVP

Maybe a solution based on Massimo's will work out:

Re: BINARY load with dynamic file name

Not applicable
Author

I was hoping that I could determine a part of the file to load.

binary '[..\' & if(documentpath() like '*production*', 'production', 'development') & '\datamodel.qvw';

But this doesn't work either...

Not applicable
Author

Hi Swuehl,

Restriction here I believe is that it needs to be in the same directory, which is not the case unfortunately...

Regards,
Marcel

swuehl
MVP
MVP

Not sure if I understand your limitation. I don't think the included script file needs to be in the same directory.

You just need to create a script file with the binary statement once for DEV, once for PROD, and have the UI QVW use a relative path to that qvs.

Anonymous
Not applicable
Author

Binary load should be first executable statement .Only one binary load should be used in one application .

Not applicable
Author

Okay!! Yes, that’s a proper work-around!

Thanks (can’t believe the answer is so easy…)

Regards,

Marcel

Not applicable
Author

May be try with Environment variable,