Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jyothish8807
Master II
Master II

Help with Section Access

Hello All,

I am trying to provide section access o the below scenario:

I have a table like this. So i am providing access on NTNAME, I want when a Student login's, he should see only his data and when a teacher access he can see his as well as all his students marks.

StudentTeacherMarks
AABC21
BABC24
CABC12
DDEF21
EDEF32
FDEF33

Thanks and Regards

KC

Best Regards,
KC
1 Solution

Accepted Solutions
JonnyPoole
Former Employee
Former Employee

You need to section on both student and teacher.

You'll have one row for each student user

Section Access;

LOAD * INLINE [

    ACCESS, USERID, STUDENT, TEACHER

    ADMIN, admin, ,

    USER, a, A, ABC

    USER, b, B, ABC

    USER, c, C, ABC

    USER, d, D, DEF

    USER, e, E, DEF

    USER, f, F, DEF

    USER, ABC, A, ABC

    USER, ABC, B, ABC

    USER, ABC, C, ABC

    USER, DEF, A, ABC

    USER, DEF, B, ABC

    USER, DEF, C, ABC

];

Section Application;

load * inline [

STUDENT,TEACHER,Marks

A,ABC,21

B,ABC,24

C,ABC,12

D,DEF,21

E,DEF,32

F,DEF,33

];

View solution in original post

7 Replies
vijetas42
Specialist
Specialist

Hi,

Can you explain your data more because I see same Marks data is available for teacher as well as student there is no such difference.

Thanks,

jyothish8807
Master II
Master II
Author

Hi Vijeta,

Over here marks are associated to Students. i am sorry i missed to updated that.

So when Student A opens the app, he should see only his data and when teacher ABC logins he should see marks of A,B,C.

Hope now i am able to clear it.

Regards

KC

Best Regards,
KC
buzzy996
Master II
Master II

follow this,


Row Level Access

  Section

Access;

Load *

Inline

[ACCESS,USERID,PASSWORD,REGION
ADMIN,A,X,
USER,U1,Y1,AFRICA
USER,U2,Y2,AMERICA
USER,U3,Y3,ASIA
USER,U4,Y4,EUROPE
USER,U5,Y5,*]
;

Section

Application;
SALES:

LOAD *

INLINE

[
REGION, PROFIT
AFRICA, 1000
AMERICA, 2000
ASIA, 3000
EUROPE, 4000
OCEANIA, 5000
]
;

JonnyPoole
Former Employee
Former Employee

You need to section on both student and teacher.

You'll have one row for each student user

Section Access;

LOAD * INLINE [

    ACCESS, USERID, STUDENT, TEACHER

    ADMIN, admin, ,

    USER, a, A, ABC

    USER, b, B, ABC

    USER, c, C, ABC

    USER, d, D, DEF

    USER, e, E, DEF

    USER, f, F, DEF

    USER, ABC, A, ABC

    USER, ABC, B, ABC

    USER, ABC, C, ABC

    USER, DEF, A, ABC

    USER, DEF, B, ABC

    USER, DEF, C, ABC

];

Section Application;

load * inline [

STUDENT,TEACHER,Marks

A,ABC,21

B,ABC,24

C,ABC,12

D,DEF,21

E,DEF,32

F,DEF,33

];

Peter_Cammaert
Partner - Champion III
Partner - Champion III

How about this?

Section Access;

// This should really load all ID's from some external source

LOAD * INLINE [

ACCESS, NTNAME, LINK

ADMIN, QVSERVICE,

ADMIN, YOU, *

USER, A, A

USER, B, B

USER, C, C

USER, D, D

USER, E, E

USER, F, F

USER, ABC, ABC

USER, DEF, DEF

];

Section Application;

// First load all your data, including the table you posted

// as an example. Call that table 'Marks'. It has to contain

// at least two fields: Student, and Teacher.

LinkTable:

NOCONCATENATE

LOAD upper(Student) AS LINK, Student

RESIDENT Marks;

CONCATENATE (linkTable)

LOAD Upper(Teacher) AS LINK, Student

RESIDENT Marks;

// Done

jyothish8807
Master II
Master II
Author

Thanks a lot Jonathan

Best Regards,
KC
jyothish8807
Master II
Master II
Author

Thanks a lot peter, both worked

Best Regards,
KC