Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
I would not agree this is a bug. GetActiveSheetId() returns the id of the currently active sheet. When you are on the Media sheet, it returns "Document\Media". When you are on the Audio sheet, GetActiveSheetId() returns "Document\Audio". That results in "false" on the Media sheet because you don't have "Document\Audio" in your SheetName field.
What you may be looking for is something like "GetThisSheetId()" -- which doesn't exist.
In the past I've arrived at the same solution that Peter suggested.
-Rob
Rob,
Just hard coding the sheet name works fine. There is really no need to call a function here - I know when sheet I am on when I am on that sheet
I was over thinking this.
Thanks,
Dave