Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Transfer external parameter by section access.

I have a lot of parameters which want to be transfered to qvw. I want to transfer them by section access.

section access;

load USERID, ACCESS, link from a.xls.....

section application;

load link from a.xls;

load A, B,  parameter1, parameter2 ....

I think if a user login with a useraccount. I can get the field of parameter1, 2.... Then I set the parameters to qlikview varibles in action(OnActiveSheet)

Every thing same to be OK. In trigger page(OnActiveSheet)

action 1: select field A in value 'link'  ------ A = link

action 2: set varable : v1=parameter1  

action 3: set varable : v2=parameter2

action 4: set varable : v=B

And now I can use varables in my QV file.  BUT the fact is THIS IS NOT WORK WELL.  Who can help and give me some advice on this. thank you .

21 Replies
Not applicable
Author

Hi, I try =now(1) it works but =now(2) is not work because of the value do not change after document opened. But now(1) will lose performance. Have a better idea ? Thanks:)

Not applicable
Author

I need either a sample QVW file or your database structure to help you further. I have done similar work using the Section access. The section access will reduce the data as soon as the user logs in. In order to do this you need to use a linking variable in your tables.

erichshiino
Partner - Master
Partner - Master

Hi, I put that on OnActiveSheet as you asked.

Now I changed it to document onOpen Action (settings-> Document Properties -> Triggers)

Was it the reason it didn't solve your problem?

Not applicable
Author

Hi,

Thanks for sharing this example file. Hope you don't mind me changing it a bit.

Please find attached the same file with some minor changes to demonstrate how the automatic data reductions happens when a user logs in. I have added an ADMIN user as "AD" and the password as "AD" (This is absolutely critical) who will have access to all countries. All other users access I have changed as USER. The users will have access to the data for the country they have been associated. I have also added COUNTRY as a parameter to the team table which will automatically reduce the data depending who has access to which country.

I have added a text object which will give the total population to demonstrate how the parameters can be directly used rather passing to another variable though actions. This will be displayed only for user A and will be hidden for everyone else. This way these parameters can be used for all other calculations.

Please have a look at it and let me know.

Best Regards,

Sajeevan

Not applicable
Author

hi Sajeevan and Erich, Thank you for your example files(v1 and v2). I have edited the file in the attachment(version 3).  I change the LinkTable and FactTable and these two table have no relation in QV data structure because I don't want to reduce data in FactTable. I just want to "transfer" the parameters for further function. Ofcause I can create a clone table named FactTable2 which is used only for transfer and get parameters. But if I use the clone table, the QV database will became to redundance and "fat". I have almost a eighty million records, so I want to just "transfer".

Not applicable
Author

Hi,

You don't need to use trigger for setting variables. You can use [settings] [variable overview] menus and set the variables like in picture below.

abc.JPG

Please find attached the modified QVW file for checking this out. Hope this is what you wants.

Best Regards,

Sajeevan

Not applicable
Author

Hi Sajeevan , Thank you for you patient. I notice that in your post you set variable values directly in =param1. It works, but the variable value will change when unselect the value or select other value in the field. What I want to do is "remember" the value whatever any select or unselect, the varibale will remain the same value. Do you have any idea about this?

Not applicable
Author

Yes, it will change if you allow the user to select the parameters which are controlling the variable values hence don't allow the user to select the parameters.

Is it required to allow the users to select another value within the parameters?

Not applicable
Author

Yes, it is. I only want variable "remember "parameters . After the variable get the value, the user can select any other  in table.  In a word, I want the variable get the parameter when the document opened in the first time, after that I don't want the value changed.

Not applicable
Author

In order to keep the values in place, users should not be left to select the same parameters which are used for passing parameters. You can create another table with a different field name for them to choose a different parameter