Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am using following Section Access code, it works fine - but I dont have a clue, if a user is loaded in the QV Authentication Table which does not get a SEC_GROUP (that's my reducing field), how to give give him by default rights to see all (listed) regions with *? How should the script look like for this approach?
Thanks for your help,
Chris
Section Access;
 
 [QV Authentication]:
 LOAD 
 ACCESS,
 NTNAME,
 USER_GROUP
 FROM
 [$(QVDPath)sec_admins.qvd] (qvd)
 WHERE 
 TRUE(); //disable optimized load
 
 
 Concatenate ([QV Authentication])
 LOAD ACCESS, 
 NTNAME,
 USER_GROUP
 FROM
 [$(QVDPath)sec_user_groups.qvd] (qvd)
 WHERE
 
   WildMatch(USER_GROUP, 
 'QV_REPORT1', 
 'QV_REPORT2');
 
 
 // ----------------------------------------
 // Security Group from Teamsite
 // ----------------------------------------
 SEC_GROUP:
 Left Join ([QV Authentication]) 
 LOAD 
 
 upper(trim(ID)) as NTNAME,
 Sec   as SEC_GROUP 
 FROM
 [$(TeamSite_Shared_Path)Test Users  Reports.xlsx] 
 (ooxml, embedded labels, header is 5 lines, table is Report);
 
 Concatenate ([QV Authentication]) Load  * INLINE [
 ACCESS, NTNAME, USER_GROUP, SEC_GROUP
 USER, NELCH, QV_REPORT1, *
 USER, NELCH, QV_REPORT2, *];
 
 Section Application;
 Star is *; // Required if wildcard characters are used in Section Application
 SA_REDUCTION:
 LOAD * INLINE [
 SEC_GROUP, key_sec
 ASIA, ASIA
 LATAM, LAT AMERICA
 AFRICA, AFRICA
 OTHER, other
  ]; 
I think it could be reached by replacing the left join of the SEC_GROUP to the authentication table with a mapping - because applymap() has a third parameter for a default value if there is no matching and which could be the star "*".
- Marcus
I think it could be reached by replacing the left join of the SEC_GROUP to the authentication table with a mapping - because applymap() has a third parameter for a default value if there is no matching and which could be the star "*".
- Marcus
Thanks Marcus, that is a very clever option - which I than tried out and works. I went back to a join due to the fact that there is not a 1-1 relationship, e.g. there is one user which could have two or more SEC_GROUP (Countries) values.