Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
carolin01
Luminary Alumni
Luminary Alumni

Section Access on Sheet Level

Hi,

I´ve the following script that is not working:

SECTION Access;
LOAD
NTNAME,
ACCESS,
Upper(USERFULLNAME) as USERFULLNAME,
upper(SOLDTOBUSINESSPARTNER.EXTERNALSALESREPNAME) as SOLDTOBUSINESSPARTNER.EXTERNALSALESREPNAME,
upper(AREASALESMANAGERNAME) as AREASALESMANAGERNAME,
upper(GENERALMANAGERNAME) as GENERALMANAGERNAME,
upper(GLOBALREGION) as GLOBALREGION,
upper(SHEETFLAGTEST) as SHEETFLAGTEST
FROM  $(vQVDPath)\SecurityFile.qvd (qvd)
where 1=1;

SheetFlag:
LOAD
  upper(SheetFlagTest) as SHEETFLAGTEST
FROM $(vQVDPath)\SecurityFile.qvd (qvd);

Now I´m using the following function on my Sheet Properties:

Conditional =SheetFlagTest=1

Unfortunately this is not working as expected. As soon as I use the conditional the sheet can´t disappears although there are users which have a sheetflag = 1. What do I do wrong?

   

NTNAMEACCESSSheetFlagTest
User 1ADMIN1
User 2ADMIN1
User 3USER
9 Replies
tamilarasu
Champion
Champion

Try changing the headers NTNAME and ACCESS like below.


SECTION Access;

LOAD
Upper(NTNAME) as NTNAME,
Upper(ACCESS) as ACCESS
,
Upper(USERFULLNAME) as USERFULLNAME,
upper(SOLDTOBUSINESSPARTNER.EXTERNALSALESREPNAME) as SOLDTOBUSINESSPARTNER.EXTERNALSALESREPNAME,
upper(AREASALESMANAGERNAME) as AREASALESMANAGERNAME,
upper(GENERALMANAGERNAME) as GENERALMANAGERNAME,
upper(GLOBALREGION) as GLOBALREGION,
upper(SHEETFLAGTEST) as SHEETFLAGTEST
FROM  $(vQVDPath)\SecurityFile.qvd (qvd)
where 1=1;

carolin01
Luminary Alumni
Luminary Alumni
Author

Unfortunately this didn´t help...

tamilarasu
Champion
Champion

I am not sure about it. I can see blank value for NTNAME User 3. Maybe try to change it as 0. You can also check the below links.

Sheet Level Security.qvw

Section access on sheet level

PradeepReddy
Specialist II
Specialist II

go through the attachment once..

carolin01
Luminary Alumni
Luminary Alumni
Author

I don´t see that the answer is in there...

carolin01
Luminary Alumni
Luminary Alumni
Author

It Looks like as soon as I enter a second value, no matter if it is 0 or 2 then the sheet disappear completely as if condition is not fullfilled anymore.

carolin01
Luminary Alumni
Luminary Alumni
Author

I also tried to Change the condition on the sheettab because I thought maybe it´s not well connected to the NTName but it´s also not the case. As soon as I have a second value it´s not working anymore. Further if I have just one value all users can see the tab no matter if the value is blank for them or 1.

=OSUser() = NTNAME and only(SHEETFLAGTEST = '1')

sasikanth
Master
Master

hi,

Can you share your QVD ?

tamilarasu
Champion
Champion

You are loading field SHEETFLAGTEST from same qvd. But one with all caps (Section access table)and one with small name (SheetFlagTest table). i.e (SHEETFLAGTEST and SheetFlagTest). Remember that QV considers this as two sepetate field names. I guess your qvd have two field names.

Second thing use 0 to hide the sheet and 1 to show the sheet. Can you please try like below.

SECTION ACCESS;

LOAD

Upper(NTNAME) as NTNAME,
Upper(ACCESS) as ACCESS,

Upper(USERFULLNAME) as USERFULLNAME,
upper(SOLDTOBUSINESSPARTNER.EXTERNALSALESREPNAME)as SOLDTOBUSINESSPARTNER.EXTERNALSALESREPNAME,
upper(AREASALESMANAGERNAME) asAREASALESMANAGERNAME,
upper(GENERALMANAGERNAME) asGENERALMANAGERNAME,
upper(GLOBALREGION) as GLOBALREGION,
upper(SHEETFLAGTEST) as SHEETFLAGTEST
FROM  $(vQVDPath)\SecurityFile.qvd (qvd)
where 1=1;


SheetFlag:

LOAD
  upper(SHEETFLAGTEST) as SHEETFLAGTEST

FROM $(vQVDPath)\SecurityFile.qvd (qvd);

* Field name SheetFlagTest should be caps. So that section access table and SheetFlag table will be linked.

As already mentioned use 0 (hide) or 1 (show) in your excel file.

In the sheet property, simply use

SHEETFLAGTEST

Or you can use

SHEETFLAGTEST=1

Both are same.