Skip to main content
Nintex Community Menu Bar

I built an Xtension file in JSON / Swagger that works for connecting through our internal web API to allow a workflow action to call the API.  But it does not work in the Nintex Form.  It should allow the Data Lookup control to call the Xtension and retrieve results that display in a drop-down list but all I get is “No data provided.”

Has anyone successfully done this and can show me their Swagger file?  I think there is something wrong with my “results” node in the file.  

Hi Pablo,

 

Just so I have more context of the use case, are you passing the Xtension anything (i.e. a value of some sort) in order for it to return results to you? Usually with a data lookup, we are going to be passing something and expecting a result back, as per my Box Search API below:

 

Configuration of the Variables being passed, and the Object being returned
Example of the Form being filled in, and the External Data object being displayed in a table
External Data configuration
Excerpt from the Swagger definition detailing the response section

So the good news is, this is possible… but I think I may just need some additional information to try and assist you with your specific use case.

 

Kind Regards,

Mark.


Thanks, Mark, for that answer.  It matches some of what I am doing.  Yes, I am passing a value into the data lookup.  And I did find the answer.  I had to work with my coworker, a web developer, on the internal Web API that was built for this.  He had to change something so that it reads the data from Nintex as “From Body” instead of “From Form.”

 

We discovered this through by looking through the logs, that when we called this Xtension in a Nintex workflow action, it contained the value of the parameter that we passed to it.  But when using a data lookup on a Nintex Form, it did not contain that value in the web API logs.  Therefore we realized that Nintex was expecting something else from us.  So we rebuilt the web API to use a “fromBody” and have it accept JSON.

I’ll show you the “before” and “after” part of the Swagger file.

Before:

"post": {
                "tags": :
                    "Customer"
                ],
                "summary": "Lookup Customer By Tax ID",
                "consumes": r
                    "multipart/form-data"
                ],
                "produces":
                    "application/json"
                ],
                "parameters":
                    {
                        "in": "formData",
                        "name": "taxId",
                        "required": true,
                        "type": "string"
                    }
                ],

After:

"post": {
                "tags":
                    "Customer"
                ],
                "summary": "Extended Customer Details",
                "consumes": u
                    "application/json",
                    "text/json",
                    "application/*+json"
                ],
                "produces": t
                    "application/json"
                ],
                "parameters": n
                    {
                        "in": "body",
                        "name": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/CustomerTaxId"
                        }
                    }
                ],

 

This now works for both the workflow action and the data lookup on the form, but we did have to re-build everything after we uploaded the new Swagger file definition into the Xtensions tab.

 

Next, I need some help in doing some Query JSON steps on some of the return data.  I will post another question soon.


Reply