Set default value based on selection

  • 22 February 2019
  • 6 replies
  • 0 views

Badge +2

Hi,

How to set default value to the field based on selection and the field is also can be editable.

E.g. If I choose work Location as office the field will set default as 8 hours and it can be editable in case the employee is on vacation/training.

Kindly assist and am new to Nintex and Javascript.

 

Thanks.

 


6 replies

Userlevel 4
Badge +12

If you use responsive forms you can achieve this by using rules instead of JavaScript.

 

Use the set value rule on your hour-field and update the field after a selection happens in your location field.

158iFF1AFB00E736A07A.png

Unfortunately responsive forms can only handly set value rules for text fields. But the upcoming universal forms that will be launched soon will be able to set almost every type of field without using JavaScrip.

 

Hope this helps.

Best regards

Enrico

Badge +2

Thanks Enrico. I'm not using responsive form.

Badge

@praios81 I was so excited to see this answer for responsive forms but unfortunately, I don't see the option "Set value" - Do you have a solution when this happens? Thanks!

 

I am trying to add this rule to the Status field.

If Accepted is Rejected, Status should default to Rejected.

4908i618F7B1841224E41.png

 

 

Userlevel 4
Badge +12

Hey @Judyism,

Set value is only available when applying a rule to a single line text field. So it won't work in choice, people or other fields. 

The upcoming new responsive designer for SharePoint will allow you to apply values to all fields but it hasn't been released so far.

 

Best regards

Enrico

Badge
Thanks for the quick reply!
Badge +12

@Judyism .....why you're not using the If condition? Also if possible use calculated control for Status field (if you're users are not modifying it and it's value is being control by other controls on the form or by workflow it makes more sense to use calculated control)

 

If(equals(Acceptance,"Rejected"), Status == "Rejected", Status == "New")

Reply