Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

carolin01
Not applicable

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

Re: Section Access on Sheet Level

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

Re: Section Access on Sheet Level

Unfortunately this didn´t help...

tamilarasu
Not applicable

Re: Section Access on Sheet Level

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

Re: Section Access on Sheet Level

go through the attachment once..

carolin01
Not applicable

Re: Section Access on Sheet Level

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

carolin01
Not applicable

Re: Section Access on Sheet Level

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

Re: Section Access on Sheet Level

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

Re: Section Access on Sheet Level

hi,

Can you share your QVD ?

tamilarasu
Not applicable

Re: Section Access on Sheet Level

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.