Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Com,
i´ve got a small problem using section access. I´ve got a table for section access with the following structure:
NTNAME | ID1 | ID2 | ID3 from | ID3 to |
---|---|---|---|---|
User1 | A | 11 | 1000 | 9999 |
User1 | A | 50 | 0 | 9999 |
User1 | B | 22 | 4500 | 5000 |
User2 | A | 11 | 0 | 9999 |
Is there any possibility to get the from/to range in section access.
Thank you in advance
Hi Christian
I would recommend you break down the 'From' and 'To' to provide a more granular access table. This is a relatively simple task. You will need the following code which firstly loads your source table, then creates a second table which lists out each of the different values.
StartData:
LOAD * INLINE [
User, ID from, ID to
A, 1, 100
B, 30, 50
C, 50, 60
D, 1, 7
];
Final:
Load
*,
[ID from]+Iterno()-1 as ID
Resident [StartData]
While ([ID from] + IterNo() -1) <= [ID to];
Drop Table StartData;
Once you have your final table, load this into Section Access via a resident load and drop the table (Final:) to ensure confidentiality of access rights.
Let me know how you get on.
Steve
Hi Stephen,
this might be a possible solution, had something simillar in my mind. The problem is the size of the table with the right infomation. There are around 4.700 different users who can have multiple rights in every ID, with almost every combination of ranges in ID 3, so that the source table has got something around 2.5 mill. lines. If I would now use this idea, the tablesize will get enormous and I think it won´t have a good performance.
Christian
The first thing to note, is that although the Section Access table will be large, most of the records are dropped when a user opens the file (as I have been taught).
I'm not sure if Qlikview supports using more complex Section Access beyond having such a simple (and therefore, large in your case) table.
There are pieces of code that spring to mind like intervalmatch and possibly an inline table to associate each ID3 to a certain group, but the issue is you have a many-to-many relationship between the ID3 and the bands, i.e.;
ID3 4567 falls into bands 0 -9999 and 4500-5000 and of course there are multiple ID3's in each band.
Is there a way to group partial bands? By this I mean, can you group say 500 ID3's together? So that in the fact table you could create a field called BAND and for a record, e.g. 4567 associate it to BAND value 4500-5000. This could be then used to drive your section access, so in stead of 500 records for multiple users, they would one get one record?
This does mean that users do not have very distinct bands such as 3452-8538 etc. Does this situation occur?
Let me know your thoughts and any further information you may have?
Steve
Hi Christian,
You will have to do something like this.
Bill