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: 
matthewp
Creator III
Creator III

Sheet trigger action OnActivateSheet Select In Field

I am trying to add an action in a sheet trigger top make a default selection however i cant get it to work.

Field

=YEAR(CREATTION_DATE)

Search String

(2014|2015)

Where am i going wrong?

1 Solution

Accepted Solutions
SergeyMak
Partner Ambassador
Partner Ambassador

Hi,

You don't have Year field.

Your =YEAR(CREATTION_DATE) is not a field.

So you just have to create it in the load script

Something like

LOAD

Your_fields,

YEAR(CREATTION_DATE) AS Year

FROM ...

Then you will be able to create your trigger.

Regards,

Sergey

Regards,
Sergey

View solution in original post

13 Replies
SergeyMak
Partner Ambassador
Partner Ambassador

Hi,

You don't have Year field.

Your =YEAR(CREATTION_DATE) is not a field.

So you just have to create it in the load script

Something like

LOAD

Your_fields,

YEAR(CREATTION_DATE) AS Year

FROM ...

Then you will be able to create your trigger.

Regards,

Sergey

Regards,
Sergey
rubenmarin1

Hi matthewp, field name can be an expression but it should return the name of the field you want to make selections, and your expression in the best case can return a number.

Maybe this works:

Field

CREATTION_DATE

Search String

(*2014|*2015)

This can work is your CREATTION_DATE format ends with year (YYYY)

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Right click on the sheet select properties then under OnActivateSheet select Add Action(s) then select SELECT IN FIELD then in the Field enter Year field and in the Search String enter (YYYY | YYYY) click OK adn OK. See screen print below

matthewp
Creator III
Creator III
Author

I like this method but unfortunately CREATION_DATE is in the format DD/MM/YYYY HH:MM:SS e.g. 28/09/2015 12:05:54

Is there anyway to use that?

rubenmarin1

Search String (*2014*|*2015*) should work... added * after year.

matthewp
Creator III
Creator III
Author

I added YEAR(CREATTION_DATE) AS Year to my load and it has pulled in a working year correctly.


However my trigger is still not working.

Field

=YEAR

Search String

(2014|2015)

matthewp
Creator III
Creator III
Author

Still nothing when using that string

SergeyMak
Partner Ambassador
Partner Ambassador

Don't use = sign

Just put YEAR as a field

Regards,
Sergey
matthewp
Creator III
Creator III
Author

Still not working unfortunately