Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Macro - Activate Sheet on Field Selection

Hi all,

I want to be able to do two things.  I am thinking a Macro might be the best way to do it.

1.     When selecting one value in a particular list box, it activates another sheet.

2.     When unselecting that value or going back to a state where more than one possible value exists, go back to the first sheet.

Is this possible?  I don't have the greatest fluency when it comes to macros.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi

     Here i attached qv file using macro as like you mentioned condition .

     Regards

Ashok

View solution in original post

8 Replies
Anonymous
Not applicable
Author

I think this is what you're after but it doesn't use a macro.

it simply makes a sheet visible or not based on the sheet Conditional setting.  Sheet Properties>General

Hope it helps.

John.

Anonymous
Not applicable
Author

I am not trying to hide / unhide a sheet.  I am trying to activate a sheet based on GetPossibleCount(field)=1. 

Anonymous
Not applicable
Author

Hi

     Hope this attached file will be helpful for your requirement.

     See the attached file using the following instruction to achieve this

     In Settings --> Document Properties --> Triggers --> Field Event Triggers --> Month --> Edit or click the

          OnSelect button

Regards

Ashok

Anonymous
Not applicable
Author

Thanks for input Ashok, but I tried that originally.  That triggers the other sheet if any number of values is selected.  I want the action to occur when only one value is selected.  And then there is no action that can be created on "unselect" to my knowledge so I cannot achieve the second part of the requirement.

I believe the only way to achieve is via a macro.  I am just not very familiar with the vb syntax needed.  In "qlikview-eese"  this is what I want to do:

(macro will be tied to activate action for object)

IF(GetPossibleCount(Field)=1,ActivateSheet.Sheet2)

IF(GetPossibleCount(Field)>1,ActivateSheet.Sheet1)

But obviously this syntax is not exactly "macro vb"

Anonymous
Not applicable
Author

Hi

     Here i attached qv file using macro as like you mentioned condition .

     Regards

Ashok

Anonymous
Not applicable
Author

That is perfect!!!  I would have been in that API document all day trying to figure it out.  Thanks so much!

Not applicable
Author

Hi Ashok,

We have a similar requirement in which we need to activate the sheet on web page load.

When we open the URL, we load the QlikView in an IFrame. The sheet is not getting activated on the web page load.

Can you please help me if you have any idea.

Thanks

Sai

Anonymous
Not applicable
Author

Hi Lorna,

have you downloaded the attached sample QVW file I have on the earlier post?

if you have a problem and my sample doesn't solve this can you post a sample QVW file so the group can see it?

Thanks,

John.