Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I wondered if there is a way to have section access with a logical OR on two different fields. For instance, people out of different countries enter their time in a time writer application, and they book their time on projects. Each project is also linked to a country. Countrymanagers should be able to see all the time postings of their people (let's say where country = US) and also all time entries against projects from US. So they should also see the time spent from French people on US projects, and also from US people on French projects.
I tried as follows but it gives no data when user 'USMANAGER' logs on. When ADMINISTRATOR logs on, he gets everything (as expected).
Any ideas ?
Thanks !
Section Access;
Load * inline
[ACCESS, NTNAME, SEC_CODE
ADMIN, ADMINISTRATOR, SEC_ALL
USER, USMANAGER, SEC_US];
Section Application;
star is *;
load * inline
[SEC_CODE , Employee_Country, Project_CountrySEC_ALL, *, *
SEC_US, US, *
SEC_US, *, US
];
Hi Stefan,
your post confused me, because I had tested it before and as an administrator I was quite sure I saw all the data, but when I now retried I saw no data at all, so you were right about that. Also, your comment gives some insight in what the synthetic key does.
After some playing around, I found out that when you use the space as wildcard, the administrator sees nothing. When you use the * preceeded by the expression 'star is *', as I did in my original post, then it turns out that the administrator sees all the data (see result in the image). Don't ask me why...
Of course, back to the original problem, as USMANAGER, you still don't see any hours.
Thanks,
regards,
Bruno.
After having reloaded a document, you can see all the data.
You need to close not only the document, but the entire QV-session in order to see the data as per your profile.
Peter
After having thought a moment on this problem, think that you cannot combine the fields, but must divide them into individual pieces.
The below should work:
Section Access;
Load * inline
[ACCESS, USERID,PASSWORD, SEC_CODE
ADMIN, ADMINISTRATOR, , SEC_ALL
USER, USMANAGER, , SEC_US];
Section Application;
star is *;
load * inline
[SEC_CODE , COUNTRY
SEC_ALL, *
SEC_US, US];
Data:
LOAD *, EMPLOYEE_COUNTRY & '-' & PROJECT_COUNTRY AS SEC_ID INLINE [Employee, EMPLOYEE_COUNTRY, ProjectID, PROJECT_COUNTRY, HOURS
John, US, PRJ_01, US, 5
John, US, PRJ_02, NL, 6
Kees, NL, PRJ_01, US, 2
Kees, NL, PRJ_02, NL, 7];
SecurityCountry:
LOAD
SEC_ID,
SUBFIELD(SEC_ID, '-') AS COUNTRY
RESIDENT
Data;
HTH
Peter
Hi Peter,
your solution is pretty much the same idea as pat.agen's second option. And it just works ! including a new function 'SUBFIELD' which makes it easy to generate records for each part from a given combination.
Many thanks to all of you for taking the time to share your thougths on this subject. You've been very helpful.
Kind regards,
Bruno.