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: 
Not applicable

Section access using generic key

Hello All,

I implemented section access using generic key . I am getting as access denied when I opened as a user.But, its working fine for admin.Please provide your suggestion.

Thanks,
Rob


Script:

TransactionTable_1:

Load * inline

[

COUNTRY,STATE,SALES,CITY

NORTH,DELHI,5000,DELHI1

SOUTH,HYD,5400,HYD1

EAST,KOLKATA,8500,KOLKATA1

NORTH,PUNJAB,3200,DELHI1

SOUTH,TAMIL,8900,TAMIL1

EAST,BENGAL,9000,UP1

EAST,KOLKATA,1000,KOLKATA2

];


Section Access;

Load

* inline [

ACCESS,  USERID, PASSWORD, COUNTRY,STATE,CITY

USER,  USER,  USER,NORTH,DELHI,<ANY>

ADMIN,  ADMIN,  ADMIN,<ANY>,KOLKATA,<ANY>

USER, USER1, USER1,EAST,<ANY>,<ANY>

];

SECTION Application;

TempAuthorizationTable:

  Load  COUNTRY &'|'& STATE &'|'& CITY as %AUTHID

  Resident TransactionTable_1;

  drop Table TransactionTable_1;

TransactionTable:

Load * ,

STATE &'|'& COUNTRY &'|'& CITY as AuthID ;

Load * inline

[

COUNTRY,STATE,SALES,CITY

NORTH,DELHI,5000,DELHI1

SOUTH,HYD,5400,HYD1

EAST,KOLKATA,8500,KOLKATA1

NORTH,PUNJAB,3200,DELHI1

SOUTH,TAMIL,8900,TAMIL1

EAST,BENGAL,9000,UP1

EAST,KOLKATA,1000,KOLKATA2

];

AutorizationBridge:

Load

   Upper(STATE &'|'& COUNTRY &'|'& CITY ) as %AUTHID,

   STATE &'|'& COUNTRY &'|'& CITY as AuthID

   Resident TransactionTable;

  

Load

   Upper('<ANY>' &'|'& COUNTRY &'|'& CITY) as %AUTHID,

     STATE &'|'& COUNTRY &'|'& CITY as AuthID

   Resident TransactionTable;

Load

   Upper(STATE &'|'& '<ANY>' &'|'& CITY) as %AUTHID,

   STATE &'|'& COUNTRY &'|'& CITY as AuthID

   Resident TransactionTable;

Load

   Upper(STATE &'|'& COUNTRY &'|'& '<ANY>') as %AUTHID,

   STATE &'|'& COUNTRY &'|'& CITY as AuthID

   Resident TransactionTable;

Load

   Upper(STATE &'|'& '<ANY>' &'|'& '<ANY>') as %AUTHID,

   STATE &'|'& COUNTRY &'|'& CITY as AuthID

   Resident TransactionTable;

Load

   Upper('<ANY>' &'|'& COUNTRY &'|'& '<ANY>') as %AUTHID,

     STATE &'|'& COUNTRY &'|'& CITY as AuthID

   Resident TransactionTable;

Load

   Upper('<ANY>' &'|'& '<ANY>' &'|'& CITY) as %AUTHID,

   STATE &'|'& COUNTRY &'|'& CITY as AuthID

   Resident TransactionTable;

Load

   Upper('<ANY>' &'|'& '<ANY>' &'|'& '<ANY>') as %AUTHID,

    STATE &'|'& COUNTRY &'|'& CITY as AuthID

   Resident TransactionTable;

1 Reply
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Best thing you can do when something is going wrong with the link field or its content: put the Sectiion Access; statement in comments, reload and check your data model and the linkage between SA table and the other tables.

More specifically, add a listbox for the USERID field to your document, select a value for which ACCESS=USER and see what happens with the remainder of the tables and fields.