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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Object Event Triggers

I have created a variable to derive the correct date for Yesterday according to specific geography (Geo) in order to screen activity for the proper local date range. For example, if I'm in California but looking at activities being done in Singapore, it's already tomorrow there. So their Yesterday is today. My variable returns the correct Yesterday for the Geo being selected:

Geo_Yesterday=date(if(GetFieldSelections(Geo)='APAC',date(localtime('Singapore'))-1 ,
if(GetFieldSelections(Geo)='EMEA',date(localtime('Bern'))-1,
if(GetFieldSelections(Geo)='Americas',date(localtime('Pacific Time (US & Canada)'))-1,
if(isNull(GetFieldSelections(Geo)) Or GetFieldSelections(Geo)='*' ,date(localtime('GMT'))-1,)))))

I can get this to work if choose the Geo before I enter the Activity reporting tab and launch an OnActivate Sheet trigger to Select in Field Activity_date_local = Geo_Yesterday. My challenge is, to get this to work within the same tab if the Geo value choice is changed. I think this would require using an Object Id trigger, but it's not working as I'd expect. I set a similar trigger for the Geo List Box object to OnActivate Select in Field Activity_date_local = Geo_Yesterday. How do I get the change of a value in the Geo List Box to fire the change in selection of the right Yesterday test for Activity_date_local?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Your problem description tells me that you need to add trigger on the field select/change (document properties - triggers) rather than on the object.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Your problem description tells me that you need to add trigger on the field select/change (document properties - triggers) rather than on the object.

Not applicable
Author

Thank you Michael. That worked perfectly. I appeciate your speedy and efficacious advice.