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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
adiarnon
Creator III
Creator III

section access

hi,

i want to manage my authorization by two fields.

i will try to explain-

i have the field 'initiator' and i have the field 'key user'.

i want that a user will see all the calls that he is the initiator of the call

and he should also see the calls that he is tha key user of them. (if he is the key user he is not the initiator and the opposite)

how should i do this?

because i think that my way he will see anly calls the he is the initiator and also the key user...

please help,

adi

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Add a new field to your datamodel. Throw the two fields Initiator & key user together as a new key field (by concatenating initiator & '-' & [key user] for example).

Now create a link table that has a field with the username and all possible key combinations from your new key field. Link the SA table in Section Access; with the link table in Section Application; through the username field.

Imagine the following SA table:

Section Access;

LOAD * INLINE [

ACCESS, NTNAME, USERNAME

USER, ACCOUNTA, USERA

USER, ACCOUNTB, USERB

USER, ACCOUNTC, USERC

];

and the following Call details table:

Section Application;

CallDetails:

LOAD *, Initiator & '-' & KeyUser AS IKU_Key INLINE [

CallID, Initiator, KeyUser

1, USERA, USERB

2, USERB, USERC

3, USERC, USERA

4, USERA, USERC

5, USERB, USERA

6, USERC, USERB

];

In Section Application; the Link table is created like this:

LinkTable:

LOAD DISTINCT Initiator AS USERNAME, IKU_Key

RESIDENT CallDetails;

CONCATENATE (LinkTable)

LOAD DISTINCT KeyUser AS USERNAME, IKU_Key

RESIDENT CallDetails;

Best,

Peter

View solution in original post

4 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Add a new field to your datamodel. Throw the two fields Initiator & key user together as a new key field (by concatenating initiator & '-' & [key user] for example).

Now create a link table that has a field with the username and all possible key combinations from your new key field. Link the SA table in Section Access; with the link table in Section Application; through the username field.

Imagine the following SA table:

Section Access;

LOAD * INLINE [

ACCESS, NTNAME, USERNAME

USER, ACCOUNTA, USERA

USER, ACCOUNTB, USERB

USER, ACCOUNTC, USERC

];

and the following Call details table:

Section Application;

CallDetails:

LOAD *, Initiator & '-' & KeyUser AS IKU_Key INLINE [

CallID, Initiator, KeyUser

1, USERA, USERB

2, USERB, USERC

3, USERC, USERA

4, USERA, USERC

5, USERB, USERA

6, USERC, USERB

];

In Section Application; the Link table is created like this:

LinkTable:

LOAD DISTINCT Initiator AS USERNAME, IKU_Key

RESIDENT CallDetails;

CONCATENATE (LinkTable)

LOAD DISTINCT KeyUser AS USERNAME, IKU_Key

RESIDENT CallDetails;

Best,

Peter

adiarnon
Creator III
Creator III
Author

hi peter.

first tnx. 😃

but i have alot of key users and alot of initiators

so the step of the load inline for the calldetails is not realy possible.

is there any othet way?

do you know somthing about <ANY>?

tnx again,

adi

Peter_Cammaert
Partner - Champion III
Partner - Champion III

The LOAD * INLINE is only present as an example. If you do not post your document in this forum, I can only guess what your data model and fields look like. I'll try to shorten the steps, but it's still a guess:

  1. Add a column to your CallDetails table that concatenates the initiator and key user fields. Use code like Initiator & '-' & KeyUser AS IKU_Key to be able to use the rest of the explanation
  2. Make sure you have a link field in your Section Access table. I called mine USERNAME, but you can call it whetever you like. Make sure that there is something in it that can be linked to the values of initiator and/or key user.
  3. Copy the two link table LOAD statements in your script. Change the USERNAME field into the same name as the link field in your SA table.
  4. Reload.

Make sure that you change the names of all fields in the example code into whatever you are currently using in your script.

Best,

Peter

adiarnon
Creator III
Creator III
Author

ok!!!

tnx now i understood

tnx