Skip to main content
Nintex Community Menu Bar

Can I Build a Dynamic Year Dropdown?

  • April 11, 2018
  • 7 replies
  • 34 views

Forum|alt.badge.img+9

I would like a dropdown with 10 consecutive years, the first year being the current year.

The following example, of course, won't work for the subsequent years, but you should understand what I'm trying to do with this.

Anyone with a successful method please share, thanks.

214228_pastedImage_1.png

7 replies

Forum|alt.badge.img+11
  • Nintex Partner
  • April 11, 2018

Hi Furst Lars‌,

I'm afraid this can currently only be done using JavaScript. Check Marian Hatala‌ reply in the following post: Adding options in choice fields dynamically in Nintex forms 2013.

NB: It seems the Choice control sees numbers as text, and as such the addition does not work..... Wrapping the year result in e.g. Abs() to get a number back rather than a string does not work either.


Forum|alt.badge.img+9
  • Author
  • April 13, 2018

So I tried the following in the choices control:

214373_pastedImage_1.png214374_pastedImage_1.png

And when I attempt to round up the 2nd working value (2019.xxxx) using fn-Round, the form throws up an error, even thought the function is available to use!

The subsequent 3rd and 4th functions fail completely.

See how buggy this is? Are you listening, Nintex?


Forum|alt.badge.img+17
  • Nintex Partner
  • April 19, 2018

Can the runtime function be used, then the format date occur?

dateAddDays

Retuns the date with the specified number of whole days added to it.

Usage

dateAddDays(date, daysToAdd)


Forum|alt.badge.img+11
  • Nintex Partner
  • April 19, 2018

Or dateAddmonths(date, monthsToAdd).


Forum|alt.badge.img+9
  • Author
  • April 19, 2018

dateAddDays is not available in the Nintex choice drop down. Only the Diff function is available. 


Forum|alt.badge.img+17
  • Nintex Partner
  • April 20, 2018

Ok, inline only for that area. What version are you on?


Forum|alt.badge.img+9
  • Author
  • April 24, 2018

NF 2013 Version: 2.10.1.0