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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fix a Variable to a Certain Value Oustide of the Script

I wish to set a variable to a fixed value outside of the script so that when users use the the qlikview application the data is filter by that value constantly. The reason for this is that I have to make many of the same file and do not want to have to edit the script in all. Also, I do not want the users to be able to see data outside of this filtered value.

For instance, is there a way I can set a variable such as Location to equal U.S. whenever the document is opened?

1 Solution

Accepted Solutions
Not applicable
Author

Hello,

you can use an OnOpening trigger to set a variable or a (pre-)selection to the apropriate value and fix it: document settings --> trigger --> add two triggers (select in field and lock field).

This is one thing. But when you want to hide data to particular users I am afraid but for my opinion you should use section access in the script.

HtH

Roland

View solution in original post

3 Replies
Not applicable
Author

You can pass a value for a variable to be set to from the command line using /v switch, or if you use the qvp protocol instead of http you can pass it in the URL (check out 'connection pseudo-URLs in the QVS reference manual).

Regards,

Gordon

Not applicable
Author

Hello,

you can use an OnOpening trigger to set a variable or a (pre-)selection to the apropriate value and fix it: document settings --> trigger --> add two triggers (select in field and lock field).

This is one thing. But when you want to hide data to particular users I am afraid but for my opinion you should use section access in the script.

HtH

Roland

Not applicable
Author

Thank you for all who replied. I tried the trigger approach and that work. Unfortunately, I was not familiar with teh command line approach so I could not verify.