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

Moderator: ArturoRobles

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

Enabling SQL Server in Windows

360DigiTMG Provides the Data Science Course with[…]

Hi team, Just came across this post and I am actu[…]

hola voy directo al problema Quiero generar un lin[…]

REST Light endpoints

Hi, I am using POST start-case API to create a […]