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

Conditioned Opening QV Document

The application I am working on has two versions - dev and prod versions.

Each version has a text object,which when clicked opens another qlikview document.

However, applications should open different documents depending weather they are located in production id in development.

Problem - when I edit the text object setting and try to edit actions -> it seems it is not allowed to use QV programming language and to write:

if (flag='DEV', DEV_app, PROD_App)

it seems I can only type the name of the QV Document.

Can you please help me configure this?

Thanks!

1 Solution

Accepted Solutions
fosuzuki
Partner - Specialist III
Partner - Specialist III

I guess that the variable's expression has an error. Try enclosing the dollar-sign expansion of TDPRFX with single quotes:

=if ('$(TDPRFX)'= 'D_', 'E2E-Prozess-KPI Vorabversion.qvw', 'E2E-Prozess-KPI Dashboard.qvw')

View solution in original post

11 Replies
fosuzuki
Partner - Specialist III
Partner - Specialist III

Create a variable "vApp" with your if expression. Then, in the action, use "='$(vApp)'"

Not applicable
Author

how should I define it- with or without comma?

either

if (flag='DEV', DEV_app, PROD_App)


or

if (flag='DEV', 'DEV_app', 'PROD_App')


?

thx

sudeepkm
Specialist III
Specialist III

I think it should open the document automatically and you do not have to define an environment for that.

You just need to specify the document name and make sure that the document is available on PROD Access Point as well as DEV Access Point.

as long as the documents are under User Document irrespective of environment it can be accessed from Access Point.

Not applicable
Author

It opens them already

But when I deploy my application from dev->prod I think dev version will overwrite the prod version, and then prodversion will open the app from dev version...

Right?

Not applicable
Author

Here it is:

Variable v_MgmtModus_App is so defined:

if ($(TDPRFX)= 'D_', E2E-Prozess-KPI Vorabversion.qvw, E2E-Prozess-KPI Dashboard.qvw )

(pay attention to TDPRFX variable)

Text object contains following in Actions->Document field

=$(v_MgmtModus_App)

It is NOT functioning

By the way, when I enter following  =$(v_MgmtModus_App)  in the text field of a text object, I get the right output -> E2E-Prozess-KPI Dashboard.qvw

So the problem is like before -> seems as if in Actions->Document filed of a text document it is NOT POSSIBLE to use QV statements.

It seems as if QV expects ONLY the document name.

Can somebody confirm that? And if that is true, is there any way to go around that?

fosuzuki
Partner - Specialist III
Partner - Specialist III

HI,

For the variable's expression, use the 2nd option, enclosing the qvws name in sigle quotes:  =if ($(TDPRFX)= 'D_', 'E2E-Prozess-KPI Vorabversion.qvw', 'E2E-Prozess-KPI Dashboard.qvw')

For the action, it is important to enclose the dollar-sign expansion in single quotes, and with the equal sign at the beginning:  ='$(v_MgmtModus_App)'   . If you try a different syntax, it will not work.

It is supposed to work, I tested it! If it is not working, pay attention to the syntax.

Not applicable
Author

your suggestion seems more elegant than the one I implemeted - I created a copy of a text box object and paasted it over the original text box object. then i edited the show on condition filed to show the corresponding object depending on weather the object is in production or in dev environment.

Problem is - now I can't find this invisible object. Can you please advise me on how to find it so i can try to implement your approach? Thanks!

D.

fosuzuki
Partner - Specialist III
Partner - Specialist III

Check the option in Document Properties > Security > Show All Sheets and Objects. It will also show the hidden sheets and objects. There is a shortcut key to enable/disable that: Ctrl+Shift+S.

Not applicable
Author

Thx for the instructions.

However, I am still getting the same error: Can't open document.

Here is the screenshot:

to.png

var.png

Regards,

D.