Skip to main content
Nintex Community Menu Bar

We have an internal API that we use in our forms in Nintex Workflow, via a custom Xtension.  In the form, we create External Data variable and Data Lookup controls to allow the user to use the API.

 

Users can type in an ID of a record into the form control and it does the lookup and returns a data set of results.  We are wanting it to handle the following scenarios:

 

  1. The Lookup is in progress
  2. The Lookup completed and returned no results
  3. The Lookup completed and has a partial data set of results (1 or more rows of results, but some of the columns are empty)
  4. The Lookup completed has a full data set of results.

So far, we can only successfully implement #2 and #4.

For #1, the problem is that we can’t get the rule to know the difference between “waiting for results” and “no results found.”

For #3, the problem is that we can’t get the rule to know the difference between “some columns are empty” and “no results found.”

I think the solution might involve something with using the Status Code returned by the API.

Has anyone had any success implementing that in the JSON Xtension configuration file?

Regarding number 3, I’d be curious if you could use the “convertToString” function on the object, and then use the “contains” function to look for blank values. That would obviously depend on what your data looks like after going through the convertToString function. 


Hi ​@PabloL,

Instead of using an Xtension you could meet the criteria by using a form plugin.
The only thing to be mindful of is securing any API key, etc, that might be used.
Using middleware in this instance may help with security.


A form plugin?  Yes, that might be beneficial!  I’ll look into that.

 

While I’m on this topic, I want to give my feedback on some issues I’ve encountered.  See these screenshots below:

Whenever the Data Lookup is happening, the Nintex Form shows this grey shaded area and the grey color changes and moves left to right.  It kind of indicates an “in progress” situation but it is really is ugly and I wish we could customize it.  I want it to actually say “Please wait a few seconds while we retrieve your information” or something descriptive of what is going on.

Next, when the lookup completes but it does not find a matching record, it displays a really ugly yellow box that says “Data failed to load.”  This makes the user believe that the form is broken, but it isn’t really broken, it simply can’t find a matching record.  I wish we could customize this.

If we could customize these things then I would not have to try to write rules to hide these controls and display other labels or build a form plugin for this.


As for the suggestion to use the “contains” function, I think that might also work but first my API developer is going to modify the API so that “When no cards are found, we return a string message stating so.”  I can write a rule that looks for this message. 👍


Reply