Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I've the below code which working to a degree,
If JOHN is the admin he should be able to see everything in the Section Application but instead I'm only seeing JOE, JANE and Jim Data.
I want to see everything in the Section Application if that make sense, so 25 right down to 8
Any Ideas?
Section Access;
LOAD * INLINE [
ACCESS, NTNAME, HOSPITALID
ADMIN, DOMAIN\JOHN, *
USER, DOMAIN\JOE, 2
USER,DOMAIN\JANE,3
USER,DOMAIN\JIM,4
];
Section Application;
LOAD * INLINE [
HospitalID, HOSPITALID
25, 25
20, 20
26, 26
6,6
16,16
22,22
5,5
9,9
4,4
27,27
23,23
14,14
15,15
28,28
10,10
17,17
11,11
3,3
2,2
1,1
8,8
];
The * in Section Access means all listed values in the section access table (not application). So you will need to include the other values in SA as well e.g. using a dummy user
you need to concatenate the rest of the values with your section access table.
Section Access;
access table:
LOAD * INLINE [
ACCESS, NTNAME, HOSPITALID
ADMIN, DOMAIN\JOHN, *
USER, DOMAIN\JOE, 2
USER,DOMAIN\JANE,3
USER,DOMAIN\JIM,4
];
concatenate
load distinct HOSPITALID resident table; //of course table is the table in your data model that contain the field HOSPITALID
Section Application;
star is *;
Hi Khalil
on the
'load distinct HOSPITALID resident table' do I need to make the change on the table part? keeps coming back saying it doesn't recognise the table
Section Access;
AccessTable:
LOAD * INLINE [
ACCESS, NTNAME, HOSPITALID
ADMIN, DOMAIN\JOHN, *
USER, DOMAIN\JOE, 2
USER,DOMAIN\JANE,3
USER,DOMAIN\JIM,4
];
SecurityValues:
LOAD * INLINE [
Hospital, HOSPITALID
25, 25
20, 20
26, 26
6,6
16,16
22,22
5,5
9,9
4,4
27,27
23,23
14,14
15,15
28,28
10,10
17,17
11,11
3,3
2,2
1,1
8,8
];
concatenate(AccessTable)
load distinct HOSPITALID resident SecurityValues;
drop table SecurityValues;
Section Application;
star is *;
DataTable:
LOAD * INLINE [
HospitalID, HOSPITALID
25, 25
20, 20
26, 26
6,6
16,16
22,22
5,5
9,9
4,4
27,27
23,23
14,14
15,15
28,28
10,10
17,17
11,11
3,3
2,2
1,1
8,8
];
I think dropping the table might be an extra step, but I hope this explains the required steps. Khalil's answer is completely correct. I am just trying to explain it a little further.