Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
There are a million posts about section access and I think reading them is making me more confused.
I am trying to apply simple logic that would look like....
section Access;
LOAD ACCESS,
USERID,
PASSWORD,
GROUP
FROM
[..\Passwords\QV_Passwords.xlsx]
(ooxml, embedded labels, table is CompPlan);
section application;
LOAD USERID,
SECURITY_DEPT
FROM
[..\Passwords\QV_Passwords.xlsx]
(ooxml, embedded labels, table is CompPlan);
ACCESS | USERID | PASSWORD | GROUP | SECURITY_DEPT |
ADMIN | ADMIN | ADMIN | ADMIN | |
ADMIN | M00768 | BMGCOMP | ADMIN | |
ADMIN | M01122 | BMGCOMP | ADMIN | |
ADMIN | M09849 | BMGCOMP | ADMIN | |
USER | M09000 | BMGCOMP | CHIEF | SURGERY |
The blanks in Security Department should be ALL departments. I have tried combinations with * and 'Star is *' (which I still do not understand) but when I run the script the reduction for 'M09000' works correctly and when I sign in as an ADMIN everything is blank.
Is there a way to say ALL departments without listing out every single one (There are quite a few!)??
Try this
I have tried *, ALL and <ANY>....
Hi Katie,
you can create a table like below
SecurityDesc,SECURITY_DEPT
ALL,SURGERY
ALL,SURGERY
ALL,SURGERY
ALL,SURGERY
SURGERY,SURGERY
etc
and link Security Desc with Section access.
and you can use ALL in admin.this way you can solve your problem
I tried...
USERID | SECURITY_DEPT |
ADMIN | ALL |
M00768 | ALL |
M01122 | ALL |
M09849 | ALL |
M09000 | SURGERY |
and when I run the ap, close it and sign in everything is null.
BUT when I sign in as 'M09000' I only see SURGERY
can you post sample qvw
hi,
Have a look at attached sample file for section access
following is credentials
ACCESS, USERID, PASSWORD, SD
ADMIN, A, A,ALL
ADMIN, B, B,ALL
ADMIN, C, C,ALL
USER, D, D,SURGERY
HAHA... you beat me to it! I was in the process of building a sample.
From looking at your sample I think the answer to my question is that I will have to write out every single Security Department?
Application;
LOAD SD,Security_Dept INLINE [
SD, Security_Dept
ALL, SURGERY
ALL, OPD
ALL,TEST
SURGERY,SURGERY
There are many different departments and we are trying to get away from hard coding each one. We would like to give 4 people in the organization administrative rights to EVERY department, even if a new department is added to our database. If they are hard coded we would have to be notified of a new department and manually go in and update it each time.
PS- thanks for your help!
It is hard to see what the problem is without an example. There are no other departments in the data to see. Anyway, two recommendations:
1. Avoid using system field (USERID in your case) as a data reduction field in section application. Use GROUP instead.
2. It is always a good idea to use upper() function even if you know that the data is in the uppercase already.
Regards,
Michael
If you want them to view all departments, you can give them access to *, which will automatically give them access to all. The following is from QV documentation:
A wildcard, i. e. *, is interpreted as all (listed) values of this field, i.e. a value listed elsewhere in this table. If used in one of the system fields (USERID, PASSWORD, NTNAME or SERIAL) in a table loaded in the access section of the script, it is interpreted as all (also not listed) possible values of this field.
hi,
load
'ALL' as SD
Security_Dept
FROM
TABLE;
UNION
load
Security_Dept as SD
Security_Dept
FROM
TABLE;
it will give you all security dept with ALL as SD.