Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using "Select in Field" to specify a different default value for each Sheet

I would like to assign a different default value for a particular field per sheet during initial open of my app.

Hence, I have created a Document Event Trigger "OnOpen" with the following actions

Select in Field

Field : [Include Reload]

Search String : =if(GetActiveSheetId()='Document\SH01','No',if(GetActiveSheetId()='Document\SH02','Yes'))

So whenever I open the app and go to sheet 1, the [Include Reload] will always be 'No' and when I go to sheet 2, the value is set to 'Yes'.

However, the code doesn't work. It always defaults to either Yes or No for both sheets.

Any ideas ?

1 Reply
Not applicable
Author

The 'OnOpen' event happens when the entire QVW is opened, it does not occur when moving from sheet to sheet.

In the properties of the sheet itself, you may add a trigger which can change this variable's value when you change sheets, the event is 'OnActivateSheet'.