Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
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???

6 Replies
boorgura
Valued Contributor

Re: Dafault Selection

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)))

Partner
Partner

Re: Dafault Selection

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

Re: Dafault Selection

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

Fields are on the right side

Not applicable

Re: Dafault Selection

See Reply above

Re: Dafault Selection

Brian,

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
boorgura
Valued Contributor

Re: Dafault Selection

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