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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Access issue in scripting

Hi

we are following agile methodology and have to complete a task within mentioned Iteration(15 days).so that what we did within the time the user able to check after the production done.

So now i am problem is regarding giving access to the particular user in scripting.

Below line using for giving access for number of users in Script.but here user can access when after the completion of production part(production will release once in a month).so the user has to wait for long time to access.

LET vBusinessUser = if(OSUSER()= 'id\companyid','Y'...

now i want instead of waiting for a month,is there is possibility to access the sheets(qlikview) irrespective of production release after refresh of Data on daily bases.

13 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

I don't have any example code but I can create something here. Imagine that you have an Excel file with a single column called Users. Load the excel column into a table and concatenate all values into a single variable. Setting a flag in your script makes no sense as you will be checking the user that is doing the reload (probably a service account) Better use match() or wildmatch() in a Conditional Show expression to hide/show objects & sheets.

UserTable:

LOAD Users FROM SecurityFile.xlsx (options);

LET vAllowedUsers = ';' & concat(Users, ';') & ';';

Now reload and put an expression like this in every conditional show field you want:

WildMatch('$(vAllowedUsers)', '*;' & OSUser() & ';*')

I think you cannot control access to your entire document with this method, but you asked for a better working script statement. See my other suggestions below for alternatives that do grant/deny access to your document.

Peter

swuehl
MVP
MVP

Just a minor correction, I think the LET statement is not working as intended, I would do it like

UserTable:

LOAD ';' & Concat(Users,';') &';' as Users;

LOAD Users INLINE [ //just to demo, use your excel table source as input table

Users

Stefan

Peter

];

Let vAllowedUsers = Peek('Users',0,'UserTable');

The Wildmatch should work then.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes, you're right Stefan, sorry. Still no aggregation functions outside of LOAD statements, no matter how badly I want them.

Thanks for correcting.

Peter

Not applicable
Author

Thanks Peter & Stefen for the suggestion.

i will try this code and let you know