AnsweredAssumed Answered

HOW TO AUTO-POPULATE FIELDS IN NINTEX FORM – JAVASCRIPT

Question asked by hrchiar on Aug 31, 2018

First, in Settings Form, go to Custom JavaScript field:

 

JavaScript code:

function setNomeCompletoValue(value){

     NWF$('#'+NomeCompleto).val(value);

}function setDataNascimentoValue(value){

     NWF$('#'+DataNascimento).val(value);

} function setNomePropriedadeValue(value){

     NWF$('#'+NomePropriedade).val(value);

}

 

  • Create a Single Line Textbox to serve as a reference of search. (named control: DatabaseCodSAPCliente)
  • Create a Calculated Value with the formula:

If(lookup("Partners_Database_v2", "Customer",DatabaseCodSAPCliente , "Customer")>1,"Registration Found", If(DatabaseCodSAPCliente==0,"","Registration not found, please contact the Analyst in your region"))

  • Create a Single Line Textbox to get the values including JS reference:

 

  • Create a hidden Calculated Value with the Lookup formula:

 

 

setNomeCompletoValue(lookup("Partners_Database_v2", "Customer",DatabaseCodSAPCliente , "Full Name"));

 

Partners_Database_v2 is a second list that is used as a database, where it will be the reference of the Lookup formula.

 

 

 After this, your Single Line Textbox will be able to autopopulate the fields as needed.

Outcomes