Set default value for drop-down list on a form

  • 16 January 2019
  • 1 reply
  • 11 views

Badge +1

I have a "Department" drop-down list on a form, which I would like to set as default to the current users department within Active Directory, but retain the list of values so that they can change this value should they wish.

I know how to pull the users department into a text field using the code : 

userProfileLookup(Current User,"Department")

I've tried putting this in as the default value on the field, but it doesn't work. Anyone managed this? I've had a look on the forums here but can't quite work it out.

Cheers!


1 reply

Userlevel 5
Badge +14

we would need more details on your setup and design...

is it dropdown for choice or lookup?

=> for the former your above formula should work, but department you query from user profile has to match up to single character with a choice option.

=> for the later, it's achievable only with javascript

do you design classic or responsive form or mobile form?

=> with classic design you could use javascript, but not with responsive nor mobile form.

SP/NINTEX product version (2007...2019) may play a role...

in some cases even exact release version might do so....

Reply