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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
sangland2
Partner - Creator
Partner - Creator

select field action using YearName field

Hi, I have a filter on a FiscalYear field which was created in the script using YearName(PostingDate). Displayed as 2014-2015. In an action on a button I cannot use Select Field function to select this field. Other date fields are OK. Setting the field to Max(FiscalYear) also does not work. Other date fields are OK  eg setting PostingDate to Max(PostingDate). It seems that the initial YearName function in the script is saving the data other than a sting or date number? Any ideas appreciated. Thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Have you already tried a

=Maxstring(FiscalYear)

as search string expression?

View solution in original post

6 Replies
swuehl
MVP
MVP

Have you already tried a

=Maxstring(FiscalYear)

as search string expression?

ecolomer
Master II
Master II

Can you upload an example file to see the problem better?

danieloberbilli
Specialist II
Specialist II

Maybe something else happens in the script with the FiscalYear field. Did you check if there are any other (e.g. date#()) functions used later on or the field was accidentally loaded twice with other settings/interpretations/values?

sangland2
Partner - Creator
Partner - Creator
Author

Thanks MaxString(FiscalYear) does work.

sangland2
Partner - Creator
Partner - Creator
Author

Yes, the yearname date value was being modified by a variable:

=yearname(PostingDate,0,$(vFiscalStartMonth))

So I had to do the same in teh select action expression to locate the correct values.

Thanks for your prompt replies.

danieloberbilli
Specialist II
Specialist II

the problem might be in your select action expression - could you post this too?