Skip to main content
Announcements
Global Transformation Awards submissions are open! SUBMIT YOUR STORY
cancel
Showing results for 
Search instead for 
Did you mean: 
danielle_v
Creator
Creator

Expression in List Box/Calendar

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!

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
danielle_v
Creator
Creator
Author

Perfect, thanks - I used your first suggestion