cancel
Showing results for 
Search instead for 
Did you mean: 
bella28
Nintex Newbie

Set default value based on selection

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.

 

Labels: (1)
0 Kudos
Reply
6 Replies
praios81
Nintex Newbie

Re: Set default value based on selection

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.

set value.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

0 Kudos
Reply
bella28
Nintex Newbie

Re: Set default value based on selection

Thanks Enrico. I'm not using responsive form.

0 Kudos
Reply
Judyism
Nintex Newbie

Re: Set default value based on selection

@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.

No Set Value 2.png

 

 

0 Kudos
Reply
praios81
Nintex Newbie

Re: Set default value based on selection

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

Reply
Judyism
Nintex Newbie

Re: Set default value based on selection

Thanks for the quick reply!
0 Kudos
Reply
Automation Master
Automation Master

Re: Set default value based on selection

@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")

0 Kudos
Reply