Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have a section access data where i want to make reduction on 'BranchID' field'.Suppose I have total 60 Branches in Branch Master. As in following case, UserID 'EMP\102' has access to 3 branches thus it is written thrice. Similarly, Now if I have to give some user access to 40 branches among 60 then do I have to mention that UserID in the section access table 40 times?? Is there any simpler way.?
ACCESS | NTNAME | BranchID |
USER | EMP\101 | 2 |
USER | EMP\102 | 1 |
USER | EMP\102 | 2 |
USER | EMP\102 | 3 |
Thanks In advance.
You can load an extra field e.g. AccessGroup where you group these 40 values in one. You can then use this field (or a combination of) to give access. N.B the field names and values need to be in capitals, so BRANCHID
Hi Piet,
Thanks for ur response.. can you please give a sample code for the same.?
Something like (by heart, I don't have qv available right now)
Section Access;
ACCESS | NTNAME | PASSWORD | BRANCHID | ACCESSGROUP |
USER | EMP\101 | * | 2 | * |
USER | EMP\102 | * | * | GROUP123 |
Section Application;
Load
...
BranchId as BRANCHID,
if(Num(BranchId)<4,'GROUP123') as ACCESSGROUP,
...
From....
Instead of the if statement you can maybe better use an Applymap of a previous mapping load where you map al the branchid's to a certain group.
Hope that helps,
Piet Hein