Skip to main content
Nintex Community Menu Bar

How to complete one field based on entry in another?

  • September 7, 2017
  • 4 replies
  • 1 view
  • Translate

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!

Did this topic help you find an answer to your question?

4 replies

Forum|alt.badge.img+9

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(' ');
 }
}

  

Translate

  • Author
  • 1 reply
  • September 12, 2017

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

Translate

Forum|alt.badge.img+7
  • Novice
  • 91 replies
  • September 18, 2017

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.

Translate

TomaszPoszytek
Forum|alt.badge.img+17

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

Regards,

Tomasz

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings