Calling a custom Web Service and passing a form control

  • 8 February 2016
  • 6 replies
  • 11 views

Userlevel 6
Badge +12

Hello all -

I am attempting to convert an InfoPath form to a Nintex form but am having difficulty setting up the web service call.

At a high level, the user selects a user from a people picker control and this is passed to the web service. The web service will then return various details like employee ID, manager, etc.

I have managed to setup the web service call, but is there anyway to pass it a parameter?

The more I think about this, I may just look into doing a SQL Request, since, at it's core, that is what the custom web service does anyways! We would like to keep it in a web service call so that anyone else can utilize the services.


6 replies

Userlevel 5
Badge +12

Hi Jesse,

Are you wanting to call the web service at the Form Level (requires Nintex Forms Enterprise edition) or within the workflow itself?

Thanks

Userlevel 6
Badge +12

From the form itself.

As of now, the form defaults to current user, but they have the ability to select another user if desired. On change, it takes the user from the people picker and provides it to the web service, and returns data which is then feed into other fields within the form.

Userlevel 5
Badge +12

Ok and just to confirm, you do have Forms Enterprise (on-prem)?   If the people picker is a Named Control (have to name the people picker control on the form first), it should be selectable as a variable to input into your webservice call.  I haven't tested this control in a while, so let us know if its not showing up there.

Thanks

Userlevel 6
Badge +12

Yes we have Forms Enterprise on prem. I think that I did not have the syntax correct for the web service call and it was causing all sorts of vague errors, on top of multiple other mistakes that I had to step through and solve one at a time.

Now that it is setup (correctly), I can pass in the parameters I want. I am passing in the current user (after stripping out the domain) and then getting back the details I want.

175409_pastedImage_0.png

Now I can just some JavaScripting to get the attributes I want to target and push them into the controls I want.

Userlevel 5
Badge +12

Looks good.

Userlevel 6
Badge +12

Once I got in there and tinkered a bit it made more sense. More trial and error at this stage, but I was looking for some place to select the method, inputs and outputs.  Similar to how the workflow web service action is setup:

175767_pastedImage_0.png

Reply