Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying to limit the access to tabs based on user groups.
I have set up a user access table, with the following fields:
ACCESS | USERID | GROUP |
ADMIN | TESTADMIN | ADMIN |
USER | TESTALL | MANAGEMENT |
USER | TESTSALES | SALES |
USER | TESTDISTRIBUTION | DISTRIBUTION |
I have set up a second table where I have the following fields:
GROUP | SHEET1 | SHEET2 | SHEET3 |
ADMIN | 1 | 1 | 1 |
MANAGEMENT | 1 | 1 | 1 |
SALES | 0 | 0 | 1 |
DISTRIBUTION | 0 | 1 | 0 |
-> Wherever the cell returns 1, the group should have access to the respective sheet.
In the document settings under "opening" I have checked "Initial Data Reduction Based on Section Access".
In the sheet properties - general if have included a condition:
=
if(sum([SHEET1]=1),0)
But it does not give me the expected result. Independant of which log on I am using, I will always see the sheet.
I have also tried to replace the condition by if([GROUP]='MANAGEMENT',0) but this one seems not to work either.
Any ideas, what I am doing wrong?
Thanks for your help,
Adi
like that:
ection access;
load * inline
[UserID,DEPT,Access
Jean,FINANCE,Admin
Anne,IS,Admin
Pierre,SALES,User
Ben,TECH,User ] ;
section application;
star is *;
load * inline
[DEPT,CostCenter
FINANCE,*
IS,5020
SALES,5030
TECH,5040 ] ;
Try that :
sum([SHEET1])>=1
I tried that before and it does not work either.... any other ideas?
you can paste the script of section access and section application?
You must have that before the script of the second table:
section application;
star is *;
Hi,
this is what the script looks like:
Section
Access;
LOAD
[ACCESS],[USERID], [GROUP],[PASSWORD]FROM
(
biff, embedded labels, table is Sheet1$);
Section
Application;
star
Load
[GROUP]
,[SHEET1],[SHEET2],[SHEET3]
FROM
(
biff, embedded labels, table is Sheet2$);
is *;It seems to load ok, as the second table is also shown in the table view and I do not get any script errors either.
the
"star is *;"
must be after the section application
like that:
ection access;
load * inline
[UserID,DEPT,Access
Jean,FINANCE,Admin
Anne,IS,Admin
Pierre,SALES,User
Ben,TECH,User ] ;
section application;
star is *;
load * inline
[DEPT,CostCenter
FINANCE,*
IS,5020
SALES,5030
TECH,5040 ] ;
You can also add in the script the fonction upper to the group:
upper(Group) as Group
to be more careful
Hi i use something like this in the sheet conditional show:
=Pick(1,SHOW_MAN_IS_2)+Pick(1,SHOW_MAN_IS)+Pick(1,SHOW_IS)
As after section access will work you should have only one row in the table 😉 the pick command should be sufficient. I never applied more then one sheet access group per user. It worked like a charm for me 😉 and the secction access looks like this:
Section Access;
LOAD [ACCESS],
NTNAME,
DEPT,
SHOW,
DISCARD,
[APPLICATION]
FROM
[..\..\..\..\..\SectionAccess.xls]
(biff, embedded labels, table is Arkusz1$) WHERE [APPLICATION] = 'XXX' OR [APPLICATION] = 'ALL' ;
Section Application;
SHOW_SH:
LOAD DISTINCT
SHOW,
IF(SHOW = 'IS',1,0) AS SHOW_IS,
IF(SHOW = 'FS',1,0) AS SHOW_FS,
IF(SHOW = 'INC_MAN_FS',1,0) AS SHOW_MAN_FS,
IF(SHOW = 'INC_MAN_IS',1,0) AS SHOW_MAN_IS,
IF(SHOW = 'INC_MAN_FS_2',1,0) AS SHOW_MAN_FS_2,
IF(SHOW = 'INC_MAN_IS_2',1,0) AS SHOW_MAN_IS_2,
IF(SHOW = 'ALL',1,0) AS SHOW_ALL
FROM
[..\..\..\..\..\SectionAccess.xls]
(biff, embedded labels, table is Arkusz1$) WHERE [APPLICATION] = 'XXX' OR [APPLICATION] = 'ALL';
Regards, Lukasz