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

How to complete one field based on entry in another?

I currently have a form where users must enter a disk id number. The next field is a drop down with a list of server names. The disk numbers start with 1-7. If the disk starts with a 1, it came from server 1, if a 2, it came from server 2 and so on. How do I make the disk id automatically trigger the correct server name in the drop down list? Thanks in advance!

Labels: (1)
Tags (2)
Reply
4 Replies
lakshminarayana
Nintex Newbie

Re: How to complete one field based on entry in another?

If 'Disk id Number' is a 'Single line of Text' then try this JavaScript code.

NWF$(document).ready(function()
{  
NWF$('#'+ txtDiskNo).bind('input',function(){ 
               fnSetServerName();
    });
});
function fnSetServerName()
{
 var disk = NWF$('#'+ txtDiskNo).val();
 
 if(disk == 1)
 {
  NWF$('#'+ddlServer).val('Server1');
 }
 else if(disk == 2)
 {
  NWF$('#'+ddlServer).val('Server2');
 }
 else
 {
  NWF$('#'+ddlServer).val(' ');
 }
}

  

Reply
mbonner
Nintex Newbie

Re: How to complete one field based on entry in another?

Thank you Lakshmi. I'm guessing I insert the code in Form Settings under Custom JavaScript

0 Kudos
Reply
Automation Master
Automation Master

Re: How to complete one field based on entry in another?

Not sure if this a prodction form yet or not, but one thing you could do if you didn't want to have JS in your form, is look at the new responsive forms. You can now set a rule for example:

Rule Name: Set Server to 1

When: startsWith("NamedControl Name", "1") == true

Then: Set Value

Named Control  = value you want to set

Only thing you would have to redo your form because you have to choose pixel perfect vs responsive. Good news is it takes 1/4 the time to create the responsive forms than the pixel perfect forms.

Reply
Highlighted
Automation Master
Automation Master

Re: How to complete one field based on entry in another?

matt bonner‌ have you resolved your issue? Is any from the above answers helpful thus you could mark it as "correct"?

Regards,

Tomasz

0 Kudos
Reply