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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dafault Selection

Dear all,

Could you kindly help me, i have a list box with a concatenation of day and month i.e. 05-Jul, 06,Jul etc as Dayofmonth. I want to default select the previous day as it loads on a daily basis but its not working. I went to sheet properties > triggers field = Dayofmonth search = MAX(Dayofmonth). What am i doing wrong???

Labels (1)
6 Replies
boorgura
Specialist
Specialist

Is Dayofmonth defined in the script?

If so, is it a concatenation of date & '-' & month? In that case, the max will not work as its not a numeric, but a string.

what you could use is:

max(makedate(year(today), right(Dayofmonth, 3), left(Dayofmonth, 2)))

Anonymous
Not applicable
Author

maybe it is not a datefield, then max(Dayofmonth) cannot work

(does the listbox Shows the field on left or right side?)

try to define max(date#(Dayofmonth,'DD-MMM')) in trigger

Not applicable
Author

The script: Day(TempDate)&'-'&Month(TempDate) As Dayofmonth,

Fields are on the right side

Not applicable
Author

See Reply above

Anil_Babu_Samineni
MVP
MVP

Brian,

You are the right, If field expression is correct from Listbox values or else share your App

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
boorgura
Specialist
Specialist

Ideally - you might want to update that to date(TempDate, 'DD-MMM') as Dayofmonth;