Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
dadumas
Creator II
Creator II

Using get() functions in set analysis not working in conditional display

I want to display sheets based on a conditional expression tied to the data model.

If I use the below in a textbox to test the calculation, it works fine (displays the correct "Count").  I have tried with double quotes and single quotes. It behaves the same.

=sum({$<SheetName={"$(=GetActiveSheetId())"}>} Count)>0

However, when I use it in a conditional expression, in the sheet properties, it does not work (sheet does not display when it should).  In my opinion, the textbox and the conditional expression should both "work" the same.  They do not.  If I hard code the sheetid, the conditional expression works fine and the sheet displays.  The GetActiveSheetId() returns Document\Media, which is what I have stored in the data model.  Again, when that is hard coded, the sheet displays fine.  I also have a textbox which displays GetActiveSheetId()

Has anyone seen this before?

Dave

11 Replies
sunny_talwar

Do you mind sharing a sample to show the issue?

dadumas
Creator II
Creator II
Author

Sunny,

QV app attached.

The page I am test with is "Media" (displays as the title).  It's SheetId is "Document\Media"

Currently, the hard code is in effect to display the sheet.  It you comment that out, and replace it with the GetActiveSheetID() statement, it does not display.  As you know, I use the "show all sheets and objects" to toggle the ability to set the conditional expression.

Thanks,

Dave

sunny_talwar

How is this helpful? I mean once you go away from that sheet, it will hide and there is probably no way to unhide it for your users... Would you be able to elaborate what is the use case here?

dadumas
Creator II
Creator II
Author

I should have explained that better, sorry.  This is a multi-tenant application, serving several companies.  When they  (company users) login to the app, the data model determines which sheets that a particular company can see.  So, depending on the user (company), sheets will show / hide.  What is also very "cool" is that the charts within each sheet will contain measures specific to that company, and the dynamic dimension labels that will display associated with them.  The measures are generic numeric values , and named generically in the sql database.  That allows a few generically named database measures to represent an unlimited number of company specific measures.  It's one of my favorite data models to date.

sunny_talwar

So, you have section access in your dashboard and you would want a company to look at only those tabs where the SheetName is available for a company? Is that what it is?

Then, I wonder why do you not want to hard code these values for each tab? I mean tab names are probably going to be fixed right, so this will be a one time thing....

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I remember trying to do the same as you are, a long time ago.

What I couldn't get to work is to show/hide each individual sheet using a generic expression that is the same for all sheets (whatever their symbol). I had to hardcode either the current sheet symbol in the expression, or (the technique I still use today) create a different variable for each sheet in the Load script and use a correspondingly named variable in a particular sheet. For example, sheet SH04 uses vShowSheet04 that includes an expression that checks a non-zero value in a field ShowSheet04 in the Data Model (controlled by Section Access).

It had something to do with finding no function that returns the ID of the sheet to which the conditional show field was attached.

dadumas
Creator II
Creator II
Author

Yes, that's what I am doing now.  Sounds like a QlikView bug where conditional display will not work with GetActiveSheetID() properly.

Not a big deal - thanks for looking at.

Dave

dadumas
Creator II
Creator II
Author

Yep - sounds like a QlikView bug.

Dave

sunny_talwar

Why do you think it isn't working... As long as you are on that tab, it does... the problem is that as soon as you move away from the tab is when you won't be able to bring it back.

I am on the Media tab and the condition statement is enabled and yet I see this tab... once I switch over to another tab, the GetActiveSheetID will change and so the sheet will hide... how are you going to ever open this without disabling the condition is the problem here

Capture.PNG