Skip to main content

Hi All,

I am building a workflow where I need the user to enter a query into a search box, then fire off a request to a Web Service, and then populate additional fields with the results of the request.

So far, I have a form workflow that gets the search text, then it fires off a Call Workflow step that goes to another workflow with a Component Workflow starting point.

The web service is called and I get the results. I have set the variable to be output so I can get it in the first form.

So that all works..

My question is. How can I then populate form fields in the original form with the results?

It seems that if I submit the original form, it moves to another state, but I can’t see how to then create another form with which I can add result data to.

 

Hopefully that makes sense :-)

 

What exactly are you trying to get. What are you using call a web service action for?

I have no idea about that action so i can't help at all but hope someone else can. ;)


Hi @msmith-wenona,

If I am understanding you correctly, you would like a Form (similar to the one used as a Start Form) to be populated with the results from the webService call, is that correct?

Just a few clarifying questions:

  • Are the fields that you want to populate displayed on the Start Form?
    • NOTE: these will never be populated if the webService call is in an action post submitting the Start Form, so it might not be worth displaying them on that form
  • Once the information is returned by the Component Workflow, are you wanting to add the information returned by the webService call into fields on a Form that a user needs to interact with in any way?

If so, you would need to create a Task Form and re-use any of the fields that may have been captured on the Start Form, as well as adding new fields for the properties you want to display from the webService call (and then set the values of those fields to the values of the returned items). I hope I am understanding your requirements, and if so, I hope I am making sense?

Please let me know if all of the above makes sense? If not we can clarify and try and get this working for you 😊

Kind Regards,

Mark.


Hey Mark,

thanks for the response.

A task form sort of helps, but introduces another layer of complexity. I.e. who to assign the task to and now the user needs to enter a value and then go to email to continue the form.

 

Hopefully the following explains the scenario a bit more.

  1. User wants to add a new supplier to our CRM for Accounts Payable purposes.
  2. User opens form and is presented with a text box to enter an ABN (Australian Business Number)
  3. They enter the ABN into the field and click Next to move to the next page of the form.
  4. In the process of clicking Next, I would like Nintex to query the ABN API (which is possible), and return the Business Name for the ABN into a variable.
  5. On the next page, present the user with the business name (in a read only text box) and ask for any additional fields to complete the new supplier request form.
  6. Then they submit it and it then moves to a workflow of approvals after that.

Hopefully that clarifies some of the scope here.

Cheers

Michael


Hi Michael,

100%, the requirement is much clearer now. Is there any possibility you could configure the webService as an Xtension perhaps? This way it could be surfaced as External Data for the form via a Data Source, and you would be able to achieve the desired result.

Just as an example, I have a form that allows me to select a Country, and once selected I return additional data about that country:

Country Selection Field displayed to user

 

Select the relevant Country from the list

 

Once selected, information is returned into the relevant fields for the user to review

 

Is this more or less what you are looking for?

Kind Regards,

Mark.


Hey Mark,

Yes!!! that looks very similar to what I want to achieve.

I hadn’t seen Xtensions before, they look pretty powerful.

 

I went and created one that I think works :-)

Added it as a data source

Then added a data lookup field and connected the data source.

But when I go back to the data lookup field, it gives me the below messages.

 

 

I can’t see a way to get the Option Label and Option value to populate with anything.

Thoughts.

 

Cheers

Michael


Hi Michael,

That’s awesome, Xtensions are definitely one of the most useful capabilities of Automation Cloud… absolutely love them. Just a quick question, were you able to test your Xtension in something like Postman or Swagger Editor and get a result?

Just to give you a working example, I have included the code from the Countries example I showed you above. There are a few thing that may just need to be tweaked to get it working, because if you were able to import it without errors, then you shouldn’t be far off.

{
"swagger":"2.0",
"info":{
"version":"1.0.0",
"title":"Countries",
"description":"Get Country Information"
},
"host":"restcountries.com",
"basePath":"/v3.1",
"schemes":h
"https"
],
"x-ntx-render-version":2,
"consumes":s
"application/json"
],
"produces":d
"application/json"
],
"paths":{
"/all":{
"get":{
"summary":"Get all Countries",
"description":"Get Country List",
"operationId":"getCountryList",
"produces":d
"application/json"
],
"responses":{
"200":{
"description":"OK",
"schema":{
"$ref":"#/definitions/all"
}
}
}
}
},
"/alpha/{code}":{
"get":{
"summary":"Get Country by Code",
"description":"Get Country by Code",
"operationId":"getCountryByCode",
"produces":d
"application/json"
],
"parameters":e
{
"name":"code",
"type":"string",
"in":"path",
"description":"Country Code",
"required":true
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"$ref":"#/definitions/byCode"
}
}
}
}
}
},
"definitions":{
"all":{
"type":"array",
"items":{
"type":"object",
"properties":{
"name":{
"type":"object",
"properties":{
"common":{
"type":"string"
}
}
},
"cca3":{
"type":"string"
}
}
}
},
"byCode":{
"type":"array",
"items":{
"type":"object",
"properties":{
"name":{
"type":"object",
"properties":{
"common":{
"type":"string"
}
}
},
"cca3":{
"type":"string"
},
"region":{
"type":"string"
},
"subregion":{
"type":"string"
},
"landlocked":{
"type":"boolean"
},
"area":{
"type":"number"
}
}
}
}
}
}

When using the code above, I can then see the properties configured under the definitions section for the “get all” method in the Option label and Option value fields for my Data Source:

 

Option label - Common and Option value - cca3 from the definitions section

I thought I would send this through so you could have a look and see if you can get the above example working in your environment, and then perhaps use it to see if there are any differences or things you needed to include in your Xtension to get it working.

Kind Regards,

Mark.


Hi @msmith-wenona 

Did these responses solve your question? 


Hey All,

Yes this definitely helps me out.

But…. (always a but), the API seems to be returning XML, so I am going to need to see how to create an OpenAPI spec for the xml.

 

Thanks all for the assistance.


Reply