Skip to main content

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.

 

106317_pastedImage_0.png

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

 

106318_pastedImage_1.png

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>

106319_pastedImage_2.png

 

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).

 

106320_pastedImage_6.png

 

The Sailboat hire form looks like below at run time.

106321_pastedImage_7.png

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.

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?


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.


Hi Ryan,

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


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.


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.


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


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


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.


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.


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


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


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.


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


Awesomeness...  CHEERS!


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


Hello, I have to take information from a tool and I use a REST API to get the information. The problem that I am facing is that I need to input a username and password ( as it is on the web request of the workflow) to have access to the API and I don´t know where to do that in the web request of the form. I have tried to input the username on the secure store target application ID but it returns "not found ID...". If someone can help me with this issue I will really appreciate it 🙂


Hello, I have to take information from a tool and I use a REST API to get the information. The problem that I am facing is that I need to input a username and password ( as it is on the web request of the workflow) to have access to the API and I don´t know where to do that in the web request of the form. I have tried to input the username on the secure store target application ID but it returns "not found ID...". If someone can help me with this issue I will really appreciate it :). 


Reply