cancel
Showing results for 
Search instead for 
Did you mean: 

Nintex Forms Enterprise - Web Request Control

shuklah
Nintex Newbie
8 17 11.1K

On 22nd July 2015 we released Nintex Forms Enterprise edition. Nintex Forms Enterprise includes the ability to bring external database connectivity and web services to forms. In this post I will demonstrate how to use the Web Request Control to create live weather data feed for a Sailboat booking form.

The Web Request control allows you to call REST APIs using either GET or POST requests by simply entering basic information such as Service URL, Request Method (GET or POST) and Authentication Type (supported types: Anonymous, Basic Authentication or Windows Authentication) . This control leverages the SharePoint Secure Store Service in order to protect the Credentials . Simply enter the target application id stored in Secure Store Service containing the credentials. For more information about Secure Store Service on SharePoint, see the Microsoft article Configure the Secure Store Service in SharePoint 2013.  This Control also supports multiple display formats similar to Nintex Choice Control - Option buttons, Checkboxes (Multiple Selection), Dropdown list or Text/Label.

For this Sailboat booking form, we want to display current wind condition (wind direction and wind speed) using Yahoo weather API. Yahoo weather API provides up-to-date weather information for any location, including 5-day forecast. However for this form we are only after the wind condition information. More information on Yahoo weather API is available here. For this form, I have used below query in the Service URL field. This query will return live wind condition information for city of Melbourne.

https://query.yahooapis.com/v1/public/yql?q=select wind from weather.forecast where woeid in (select woeid from geo.places(1) where text='melbourne')&format=json

You can execute your web request during design time by using "Run Now" dialog. By clicking on "Test Request" button you can view the results in test results section. Please note that when you perform "Test Request" - any specific create, query, update or delete operations are committed. For our request the Test Result section shows below data:

<?xml version="1.0" encoding="utf-16"?>

<query>

  <count>1</count>

  <created>2015-08-06T04:01:24Z</created>

  <lang>en-US</lang>

  <results>

    <channel>

      <wind>

        <chill>55</chill>

        <direction>240</direction>

        <speed>20</speed>

      </wind>

    </channel>

  </results>

</query>

Now you can select which value to be displayed using Xpath .In this case I have selected direction element value to be displayed.

I have also configured another web request control on this form with label display format using the same API to show Wind Speed (mph).

The Sailboat hire form looks like below at run time.

Over the coming months, we will be adding additional capabilities to the SQL Request and Web Request control to further enhance the capabilities for you to use in your Enterprise Forms.

Tags (1)
17 Comments
greenawayr
Nintex Newbie

I like this a lot. We'll be looking forward to using this to display data from data warehouse and service bus. Will there be options for periodic refreshes so we can have live data updates on the form?

baltner
Nintex Newbie

Tried to run the test but got  "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."  Changed it from "https" to "http" and it worked fine.  Thanks for the tip.

Nintex Employee
Nintex Employee

Hi Ryan,

Thanks for the feedback, we were wondering what your use case is for the periodic refreshes?

greenawayr
Nintex Newbie

A couple of thoughts came to mind. We have a number of large forms that may be open for an hour or more whilst being filled in. The user will have two screens open as they reference data from another application. We could surface that data in the form, but because the data input may depend on the data from the app, it needs to refresh, either automatically or on request.

kkittinger
Nintex Newbie

Are there going to be any examples of a form leveraging the Secure Store Service. As this is something me and my client would like to do.  Have tired it myself and have yet to get it to work.

Nintex Employee
Nintex Employee

Hi Kevin,

For the Secure Store Service configuration I would recommend checking out the TechNet article here. There is a good video showing step-by-step configuration.

Cheers,

Euan

Not applicable

Thanks for this example. It looks really interesting.

I tried it with one of my client and noticed that the XML response was encoded (with a SOAP response) and therefore, it is not possible to use this action. Is there a way to decode the XML in Nintex instead of changing the WebService response?

artman
Nintex Newbie

Hi

I want to use web service but I can't find web service tool in nintex form 2013, Would you please help me?

Thanks

Naeemeh

kkittinger
Nintex Newbie

What version of Nintex are you running. If you don't have the enterprise version Web and Request Service Actions aren't available to you.

cbennett1
Nintex Newbie

Is there ANYWAY to format the data FROM a web service call?  The data that I'm receiving from my call will be a part of a label.  When it comes back, I've used the snazzy NINTEX edit bar tools to attempt to BOLD the data and increase its size, since it's a label (e.g. "Please select the appropriate actions:"), however, nothing seems to "force" the data on the form to change its look/feel.  Please advise.

cbennett1
Nintex Newbie

I'm on NINTEX Forms Enterprise & NINTEX Workflow Enterprise...BTW....

cbennett1
Nintex Newbie

We found out the WEB REQUEST CONTROL is only available at the NINTEXT Forms Enterprise level... Of course all we had to do was READ...  Didn't realize...  #Shrugs

artman
Nintex Newbie

Hi

I see my nintex form It's standard version but when I'm asking from store that I get it she seid to me nintex form didn't have enterprise version, I use Nintex form On-Premises sharepoint.

artman
Nintex Newbie

Thanks, I changed my license to enterprise and I found it.

cbennett1
Nintex Newbie

Awesomeness...  CHEERS!

Not applicable

Hi, Great functionality! When will this action be available in Nintex Forms Online? What is the current workaround if it is not going to be available for a while? Thanks in advance.

thanker
Nintex Newbie

how to set avalue using a Jquery on custom script for the webrequest control when it is  lable or text box?

i tried the below:

NWF$("#" + webrequestval).text("");

NWF$("#" + webrequestval).val("");

but it fails