Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with making tab access user dependant

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:

ACCESSUSERIDGROUP
ADMINTESTADMINADMIN
USERTESTALLMANAGEMENT
USERTESTSALESSALES
USERTESTDISTRIBUTIONDISTRIBUTION


I have set up a second table where I have the following fields:

GROUPSHEET1SHEET2SHEET3
ADMIN111
MANAGEMENT111
SALES001
DISTRIBUTION010


-> 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



1 Solution

Accepted Solutions
Not applicable
Author

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 ] ;

View solution in original post

9 Replies
Not applicable
Author

Try that :

sum([SHEET1])>=1

Not applicable
Author

I tried that before and it does not work either.... any other ideas?

Not applicable
Author

you can paste the script of section access and section application?

Not applicable
Author

You must have that before the script of the second table:

section application;

star is *;

Not applicable
Author

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.

Not applicable
Author

the

"star is *;"

must be after the section application

Not applicable
Author

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 ] ;

Not applicable
Author

You can also add in the script the fonction upper to the group:

upper(Group) as Group

to be more careful

Not applicable
Author

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