Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've just started using V9 today and I thought that it was now possible to set default selections when you activate a sheet.
I have a calendar object containing the field 'order date', when the sheet is activated I would like the maximum 'order date' to be automatically selected.
I've tried to use the sheet trigger 'on activate sheet', but it doesn't seem to be working, and I can't find much help in the manual.
Any help would be much appriciated!
Thanks
Helen
Hi Helen,
See if this example in QlikView Cookbook 9.0 helps. Or else you will need to write a macro which will select the maximum date and will do the selections.
Hi,
Thanks a lot - thats exactly what I needed!
Thanks
Helen ![]()
Your subject clearly mentioned that "Without macro". But the example is done based on macro.
Has anybody know to do without macro. Is it possible?
-Raghu.
To do this in V9 without a macro you need to set a Trigger on a sheet.
Go to Sheet Properties and select the Triggers tab.
Under the Sheet Event Triggers section select the Add Actions button
In the Dialogue that comes up, you can select a number of different things that can happen when you activate the sheet. This is where you would enumerate the items you would want to have selected when you first enter the sheet.
Keep in mind that you can add multiple actions if you need to select from multiple fields.
Hope this helps.
Thanks - thats what I was after but I can't get it to select the max date - i can get it to perform other actions (e.g clear all selections).
Can you let me know what i 'm doing wrong?!
Sheet Properties - onactivtatesheet - addactions -
Actions = select in field
Field =
"max(ALL Order Date)"
Thanks
Helen
Helen,
The short answer is:
Sheet Properties->OnActivateSheet->Add Actions
'Add' Button
Action Type: Selection Action: Select in Field
Field: Field Name (WITHOUT SQUARE BRACKETS)
Search String: =Max(ALL [Order Date]) <- must use the equals sign
The longer answer is:
I find it wierd that you must explicitly remove the square brackets from the Field name in the Field input box. Smells like a bug to me. Also, I noticed that when I went back in to the event triggers my MAX statement was no longer there, but had been replaced by what the statement evaluates to (ie. 6-15-2009). This also smells like a bug...
I did get it to work this way, but it seems like an incomplete solution at this point. See what you think.
sjprows
Hi,
Yes i have got it to work now in that way, however i'm getting the same bug (i.e the max statement disapears when I go back in).
Thanks
Helen
Is it possible to use more than one value as search string?
For example, I want to select the values 1, 5, 9.
I have tried "{1,5,9} but it doesnt work. Any suggestions?