Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a list box containing my Year field. The dataset I'm using contains a few years worth of data, however I would like to write an expression in order for the list box to only show years that are equal to or greater than the year of today (ie. the current year).
So for example, today's date is 28/02/2013, so I would like to only show 2013, 2014, 2015 etc. in my list box for the user to be able to select from. 2012, 2011, 2010 etc. should not appear in the list box.
I have tried a few things but can't get it to work - is it possible?
Any help greatly appreciated!
Hi,
Try this.
Create a new list box (by Right clicking on the canvas). Here in field section, select Expression.
Write below expression.
if(Year >= year(today()),Year)
Or you can also create the field in script which gives you the year equal to or greater then current year.
Expression will be the same.
hope this helps.
Regards,
Kaushik Solanki
Hi,
Try this.
Create a new list box (by Right clicking on the canvas). Here in field section, select Expression.
Write below expression.
if(Year >= year(today()),Year)
Or you can also create the field in script which gives you the year equal to or greater then current year.
Expression will be the same.
hope this helps.
Regards,
Kaushik Solanki
Perfect, thanks - I used your first suggestion