Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
I have a list box with dates on it, there are dates in the past present and future, I wish to default the first displayed date as Today -5,
Can this be done ?
Thanks,
A
Hi,
You can easily play with the expression and achieve this. The same expression which i have posted can be used according to your requirement.
just need to change 1, 2, 3...... according to the order of the date.
Compare the date you want at first and give 1 no to it and same for others.
Regards,
Kaushik Solanki
hi,
Right click on list box and so to sort tab select expression and type
if(date(listboxname)=date(today()-5), listboxname)
Sumit
Hi Sumit
I can not get it to work,
The List Box is based on a Cyclic Group called Date Group , I have changed it to Date field and tried
if(date(Date)=date(today()-5), Date)
But I am afraid this does not work either , perhaps you could help
Thanks
A
Hi,
Try this:
if ( num([Date Group]) = num(today())-5,[Date Group])
Hope this helps,
Erich
Hi Erich,
I was away for awhile, the above is very helpful, but that just brings the date 5 days ago to the top of the list box, at the moment it looks like this
DATE GROUP
1/03/11
2/03/11
3/03/11 etc etc etc
20/08/11
21/08/11
I wish for the last 5 days to be top of the list box, so today is the 23/08/11 so,
DATE GROUP
18/08/11
19/08/11
20/08/11
21/08/11
22/08/11
1/03/11
2/03/11 Etc etc
Is this possible ?
Thanks
A
Hi,
Try this in sort tab.
Check Expression and type
if ( num([Date Group]) = num(today())-5,1,2)
Uncheck every other sort options.
Regards,
Kaushik Solanki
Hi Kaushik,
This is giving me - the date 5 days ago plus the date 4 days ago, see below
DATE GROUP
18/08/11
19/08/11
1/03/11
2/03/11 Etc etc
I have tried to amend yourexpression to if ( num([Date Group]) = num(today())-5,1,2,3,4,5) to get all 5 dates but it is not working , can you help, perhaps I am doing some
Hi,
Try this then:
if ( num([Date Group]) <= num(today())-5, num ( [Date Group]),num ( [Date Group])*1000 )
The if condition will just create weights to the two sets of dates
Hope this helps,
Erich
Hi,
Try this.
if ( num([Date Group]) = num(today())-5,1,
if ( num([Date Group]) = num(today())-4,2,
if ( num([Date Group]) = num(today())-3,3,
if ( num([Date Group]) = num(today())-2,4,
if ( num([Date Group]) = num(today())-1,5)))))
Regards,
Kaushik Solanki
Im really sorry guys this just does not seem to work, for Erich solution there is no change to the order 9 I have put in sort tab, ticked expression and pasted in)
For Kaushik, I cant quite figure out what I am getting , the following is the result,
The 7/03/11 is the First calander date !! i would have liked it to be
Date
17/08/11
18/8/11
19/8/11
22/8/11
23/8/11
7/03/11
8/3/11
etc etc
Thanks guys