Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Check this post that has working code. Base your on it to get it working. Your script seems to be fine, except for the names and values of fields that must be all UPPERCASE in Section access table. You can set the section access ... section application at the beginning or at the end of the script. Note that QlikView is case sensitive for both names and values in fields, so field "SALES" is not the same as field "sales".
Hope that helps.
Miguel
Thank you Michael for your reply. So if I am understanding it should look something like this.
Section Access;
LOAD * INLINE [
DEPT,ACCESS, USERID, PASSWORD,NTNAME
IT,ADMIN, *, * , ZATEST\KREYNEKE
If I understand correct then you can leave userid and password out or as * as it will look at your windows logon.
Thank you
Kallie
Hi Kallie,
That is correct, it will take the password from the current credentials. If you don't need to perform batch reloads as in the example discussed in the post I mentioned, you don't even need to specify USERID and PASSWORD at all. You can remove them if you are not going to use it.
Hope that helps.
Miguel
Thank you Michael,
It was confusing me a lot. I just have one other question which I am not sure how to specify. In the section application how do I specify that a certain salesperson can only see their data. We have 10 salespeople but only the salesmanager is allowed to see all 10 people sales data but each salesperson should see his own sales?
Sorry to ask so many questions
Thank you
Kallie
Hi Kallie,
You will need to add as many lines as needed for each value. Consider the following script:
SECTION ACCESS;
LOAD * INLINE [
ACCESS, USERID, REDUCTION
ADMIN, 1, 1
ADMIN, 2, 1
ADMIN, 3, 1
ADMIN, 4, 4
];
SECTION APPLICATION;
STAR IS *;
// You need here as many values for reduction 4 as you want
DATA:
LOAD * INLINE [
REDUCTION, ZONE
1, Zone1
2, Zone2
3, Zone3
4, Zone1
4, Zone2
4, Zone3
];
As you can see, user 4 that is the manager has all three lines for each of the existing user. The "*" will not work here.
Hope that helps.
Miguel
Thank you Miguel,
I am busy setting that up. This might be a stupid question but where do I define the zone?
Thanks
Kallie
Hi Kallie,
Zone is a field that must exist in your data model. The piece of code above is just an example. Think of sales people and a sales manager, and customers instead of zones. Each sales people can see his or her customer, but the sales manager can see all customers, so he needs to have all three lines for the three customers.
Hope that makes more sense now.
Miguel