Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
NTNAME | ACCESS | SheetFlagTest |
User 1 | ADMIN | 1 |
User 2 | ADMIN | 1 |
User 3 | USER |
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;
Unfortunately this didn´t help...
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.
go through the attachment once..
I don´t see that the answer is in there...
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.
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')
hi,
Can you share your QVD ?
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.