Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jamesrizzitano
New Contributor II

Section access newbie.

I am new to qlik sense and have been trying to restrict data in an app based on region.  With the below code nothing is being restricted.

All users are seeing all territories.

LOAD * inline [

ACCESS, USERID,REDUCTION

USER, DOMAIN\admin,*

USER, DOMAIN\dev1,MIDATLANTIC

USER, DOMAIN\rep1,MIDATLANTIC

USER, DOMAIN\dev2, MIDWEST

USER, DOMAIN\rep2, MIDWEST

USER, DOMAIN\rep3, NORTHEAST

USER, DOMAIN\rep4, SOUTHEAST

USER, DOMAIN\rep5, SOUTHWEST

USER, DOMAIN\rep6, WEST

USER, INTERNAL\SA_SCHEDULER,*

];

section application;

Territories:

LOAD *,

UPPER(SECCODEDESC) AS REDUCTION;

SQL

SELECT T.SECCODEID,

       T.SECCODEDESC,

       SALESREP = CASE SECCODEID

WHEN 'F9ZI3A00000V' THEN 'Rep1'

WHEN 'F9ZI3A000003' THEN 'Rep 2'

WHEN 'F9ZI3A000002' THEN 'Rep 3'

WHEN 'FTQ8T0000127' THEN 'Rep 4'

WHEN 'F9ZI3A000005' THEN 'Rep 5'

WHEN 'F9ZI3A000004' THEN 'Rep 6'

                   

      END,

  ANNUALBUDGET = CASE SECCODEID

WHEN 'F9ZI3A00000V' THEN '1495700'

WHEN 'F9ZI3A000003' THEN '1682600'

WHEN 'F9ZI3A000002' THEN '1495700'

WHEN 'FTQ8T0000127' THEN '1395700'

WHEN 'F9ZI3A000005' THEN '1395700'

WHEN 'F9ZI3A000004' THEN '1795700'

       END

     

FROM SERVERNAME.SYSDBA.SECCODE t

WHERE T.SECCODEDESC in ('Midwest','Midatlantic','Northeast','Southeast','Southwest','West')

;

1 Solution

Accepted Solutions
jamesrizzitano
New Contributor II

Re: Section access newbie.

Yes,

It was silly.  I left off Section Access; to start the script.

Thank You

3 Replies
jschrader
New Contributor III

Re: Section access newbie.

Were you able to get the issue resolved?

jamesrizzitano
New Contributor II

Re: Section access newbie.

Yes,

It was silly.  I left off Section Access; to start the script.

Thank You

jschrader
New Contributor III

Re: Section access newbie.

Happens to all of us

Community Browser