Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Tags (1)
1 Solution

Accepted Solutions
swuehl
Not applicable

Re: Binary load based on documentpath()

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.

9 Replies
Clever_Anjos
Not applicable

Re: Binary load based on documentpath()

Can´t do that

Binary command MUST be the very first command

jontydkpi
Not applicable

Re: Binary load based on documentpath()

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
Not applicable

Re: Binary load based on documentpath()

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

Re: BINARY load with dynamic file name

Not applicable

Re: Binary load based on documentpath()

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

Re: Binary load based on documentpath()

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
Not applicable

Re: Binary load based on documentpath()

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.

rgvavihs
Not applicable

Re: Binary load based on documentpath()

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

Not applicable

Re: Binary load based on documentpath()

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

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

Regards,

Marcel

Not applicable

Re: Binary load based on documentpath()

May be try with Environment variable,