Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This is my first time using macros in Qlikview (and macros altogether in a very long time) I have a simple question regarding a macro when selecting a sheet.
I would like a specific listbox with years to be automatically selected with the latest year.
So on the OnActivateSheet Trigger, i have a macro which clears the selection:
ActiveDocument.Fields("Year").Clear
How would I get the field to be selected with the latest year?
The 'Year' field is in a 'Dates' table which has been retrieved on the load.
Hopefully somebody can help.
Thanks!
-Mike
Sorry to utlize this thread, but I was struggling with the same sort of issue, but I can't seem to make this work.
I am using version 9, and tried what biester suggested: Document Properties > Triggers > OnOpen > Select in field.
In Field I have "[AP Date]" (stands for Accounts Payable date), and Search String "= Max ([AP Date])", but this does not choose the latest date in the list. What is wrong?
Thanks, - TP
Does it select any value? Can you post the qvw?
-Rob
Hi,
I'm also struggling with this. I´m trying to use the new functionality with triggers instead of using macros in order to improve the performance.
I'm having a variable generated in the script containing a Period. I then want to use this variable in my trigger in order to select a Year Month by default in the chart.
I´m trying to use the activity "Choose in field" and then use my variable as a search string to my field. For some reason this doesn´t work. It works fine if I hardcode a Period instead of using my variable.
Any idea anybody?
Regards
Perfect ! Thanks!
It works fine!