Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Change from Calendar Week to Fiscal Week when activate a certain sheet.

Hi,

I currently have two sets of dates ,Fiscal Week & Calendar Week. I Have 1 button selects Fiscal Or Calendar week to be shown.

What I'm trying to do is to get say Page 1; each time it is activated to select the button to show fiscal week if Calendar week is currently selected.

If Fiscal Week is already selected then to do nothing..

Any help would be really appreciated..

Thanks in advance

Dan

2 Replies
Highlighted
Luminary
Luminary

Re: Change from Calendar Week to Fiscal Week when activate a certain sheet.

Dan,

If I understand this correctly the crux of your issue is to get a button to be pressed when a particular sheet becomes active - ie when the user navigates to Tab2 from Tab1.

Therefore:

On the tab you want to switch to Fiscal Year select Sheet Properties > Triggers and add an Action to the OnActivateSheet event, tha action should launch a macro called 'ButtonPress'.

Enter the Macro editor (Ctrl+m from the front-end) and create the following macro:

Sub ButtonPress

ActiveDocument.GetSheetObject("MyButtonID").Press

End Sub

Now when the sheet is activated the macro will be called by the triggered action and the button will be 'pressed'.

You could easily incorporate all that into one OnActivateSheet action.

Hope that helps,

Matt - Visual Analytics Ltd

Highlighted
MVP
MVP

Change from Calendar Week to Fiscal Week when activate a certain sheet.

Hi Dan,

do each press of your button cycle between fiscal and calendar?

I would then rather use a selection action on sheet activation trigger:

Sheet properties -> Triggers, add an action  to the OnActivateSheet, but then action type = "selection" and action = "Select in field" with your calendar type field name and value = "fiscal".

Alternatively, if you want to use a macro you might add a if condition checking the current selection = calendar then activate button.

Regards,

Stefan