Skip to main content
Nintex Community Menu Bar

Fill one field automatically when inserting data into another field, using webservices

  • March 21, 2017
  • 9 replies
  • 99 views

Forum|alt.badge.img+7

I have a form with one ID field and another one with the name of the person.
When the user fill the ID, the nintex must automatically populate the name using a webservice.
How can I do this?

9 replies

Forum|alt.badge.img+8

Hi Jose Fidalgo‌,

The following article might proof useful for you: Nintex Forms Enterprise - Web Request Control

Cheers,

Rick

web service


Forum|alt.badge.img+7
  • Author
  • Rookie
  • March 21, 2017

My license is standard not enterprise


Forum|alt.badge.img+14
  • Scholar
  • March 21, 2017

then nintex will not do it for you and you have to write your own script to call webservice, process its output  and populate respective control.

try to search the forum, there are plenty of examples how to call webservice from javascript

https://community.nintex.com/search.jspa?q=ajax+javascript 


Forum|alt.badge.img+8

Besides what  mentions, you have the following 2 options:

  1. Develop a custom web control (if you are on-prem).
  2. Convince your boss to buy the Enterprise license so in total your company save money because you do not have to write/test/maintain/document custom code yourself AND get many other goodies too.

If I were you I would go for option 2.


Forum|alt.badge.img+14
  • Scholar
  • April 19, 2017

Hi ‌,

have you resolved this?

if so, could you mark it answered?

#BRGreview


Forum|alt.badge.img+7
  • Author
  • Rookie
  • April 20, 2017

yes using javascript


Forum|alt.badge.img+14
  • Scholar
  • April 20, 2017

so, ‌, if any of post above provided you with a solution, please mark one as correct answer.

if you implemented completely another solution, you post a description of it and that one as correct answer.

thanks.


Forum|alt.badge.img+7
  • Author
  • Rookie
  • April 20, 2017

I created in custom javascript, using ajax to get database value through web services

NWF$(document).ready(function() {       
          
var TextareaselectorID='#'+EmployeeID;
var emp= NWF$(TextareaselectorID);
 
emp.change(function(){
var weburl='http://appserver.coficab.pt:8080/LocalWebService.asmx/person';
user=emp.val();
                   
$.ajax({
async: false,
type: 'POST',
url: weburl,
data: JSON.stringify({ user: user }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
var dadosuser = response.d;

var textnome='#'+cname;
var nomeuser=NWF$(textnome);
nomeuser.val(dadosuser.Nome);

var textDepartment='#'+dep;
var Departmentuser=NWF$(textDepartment);
Departmentuser.val(dadosuser.departamento);

},
failure: function () {
alert("erro");
}
});

});


 
});
 

Need to configure single line texbox "Client ID javaScript variable"


Forum|alt.badge.img+14
  • Scholar
  • April 20, 2017

great.

thanks for sharing.