Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
chriys1337
Creator III
Creator III

Section Access, how to give * rights by default, if there are no red field loaded for specific user?

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
  ]
;

1 Solution

Accepted Solutions
marcus_sommer

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

View solution in original post

2 Replies
marcus_sommer

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

chriys1337
Creator III
Creator III
Author

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.