redingtonct wrote:Would this require multiple listings for each user in the Section Access table, one for each cost code? Or is there a different approach I should take?
The short answer is: yes, you need to specify every possible COSTCODE value for each USER value.
However, its obviously tedious. So I'd recommend you to create a table, QVD, xls file or something similar with groups of users and memberships, for example, user A member of GROUP1, and user B member of GROUP2, so the section access script looks like
SECTION ACCESS; LOAD ACCESS, USERID, PASSWORD, GROUPFROM SA.QVD (QVD) WHERE 1=1; SECTION APPLICATION; Correspondence: // inline or any other sourceLOAD * INLINE [GROUP, COSTCODEGROUP1, 100-01GROUP1, 200-01GROUP2, 200-01GROUP2, 300-01];
Of course, in the example above, loading INLINE only takes you more time, but if the correspondence is possible, the script will be smaller.
Hope that helps
Miguel, thanks for offering the clarification.
In my case, this turns out to be fairly easy. Since the CostCodePermissionsTable includes a record for each cost code that a user has access to, and since the UserLogin is used in that table, I can simply use UserLogin as the GROUP in section access. The resultant code would look like this:
SELECT UPPER(UserLogin) as NTNAME,
CASE WHEN Role = 'VP' THEN'ADMIN'
END as ACCESS,
UPPER(UserLogin) as GROUP
SELECT UPPER(UserLogin) as GROUP, COSTCODE