Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By kleung

I would like to use a dropdown list for users to select a year. Instead of hard code a wide range of years, would be it possible to use Javascript to build the years in the options, e.g. from 1990 to current year, for user selection?

Many Thanks

User avatar
By amosbatto
Add this trigger to the process:
Code: Select all
@=aYears = []; 
$year = 1990;
while ($year <= date('Y')) {
     @=aYears[] = [$year, $year];
Set this trigger to fire before the Dynaform holding the dropdown box.

Then, in the properties of the dropdown in the Dynaform, set the datasource property to "array variable" and set the data variable property to: @@aYears
By kleung
Hi Amos,

The $aYears could be assigned with the desired values.
But the values could not be shown in the dropdown list, i.e. all the contents are blanks. I also note that the values in the labels were converted to strings.
How to fix it?

Many Thx


Hi, Is there any way to show my custom column only[…]

Send for clarification

Hi, I know this is an old post but i could not fin[…]

add dropdown to search process

Please replay if there is any solution!!!!

Amosbatto, is down.

Hi Amos, I appreciate you setting up a tips and t[…]