Discussion

Dynamic Population of values based on current month/day/year

Hi Team,

I have the following requirement.Could you please help us to accomplish this.

1.I have a dropdown, where year value will be displayed to select like 2012,2013,2014.

These values should be populated in such a way from the current year it should display previous 7 years alone. In the next year it should change dynamically

likewise we need for month also.

Thanks for ur replies in advance.

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

June 1, 2015 - 6:17am

You can use a DynamicSelect control in the UI.While populating the list for the dropdown, you can call CurrentDateTime function and truncate the year part to fetch current year. Iterating it 7 times, you can subtract the year by 1 in each iteration and append it to results.

June 2, 2015 - 10:26am

Moving this thread to the UI forum, as it is not related to PDN's Forum FAQ, General Rules or expecations.