This document discusses how KWizCom Forms can connect SharePoint forms to external data sources. It provides features like loading default field values, conditional formatting, and passing parameters to external APIs or databases. The document demonstrates examples of loading product inventory details from SQL Server as default values and updating inventory quantities after an order is placed. It also shows how to build and manage external data connections and use custom web services to retrieve user profile details.
1. KWizCom Forms
Connect your forms to
external data sources
Nimrod Geva
Product Group Manager
nimrod@kwizcom.com
100% SharePoint-Native Forms & Mobile Solution
2. External Values
Your SharePoint list form
SharePoint /
LOB system /
Database
HTTP/S
Web request with dynamic parameters
Returned external value
3. External values– key features
• Field default values
• Dynamic conditions
• Custom actions
• Pass dynamic parameters
• Update external sources
• Cache external values
• S.C repository of external values
Your SharePoint list form
SharePoint /
LOB system /
Database
HTTP/S
Web request with dynamic parameters
Returned external value
27. When saving the order we want to
subtract the ordered quantity from
the product’s remaining inventory.
28. Use the SQL service with an
UPDATE SQL sentence
Command=UPDATE Inventory SET
AvailableQty=AvailableQty-'[quantity]' WHERE
ProductID='[ProductID]'
Create an external value called
“UpdateInventory”
29. We need to set-up 2 field-constraint rules
1
Verify that ordered quantity is
less than available inventory
30. We need to set-up 2 field-constraint rules
2
This is a dummy constraint (will
never fail), conditionally run if
ordered quantity is less than
inventory.
The rule uses the external value
that executes the database
update.
31. Demo
Use custom web url:
Load user details from SharePoint profile service
by using custom ASP.NET page
32. We want to load agent’s details
from the SharePoint Profile
service
33. We have created an external value
that uses a custom ASPX page that
gets a requested property from
the profile shervice
In version v13.3.00 we’ve introduced a new feature called “External values”.
An external value is a web request, that uses dynamic parameters and returns a value of defined type.
So, where in KWizCom Forms can we use these “external values”?
Everywhere!
As field default values
As values in conditions in all KWizCom Forms setting pages
In custom actions
Ready-to-use services enable you to connect your SharePoint forms to the following sources:
Remote SharePoint lists
SQL server
Oracle
Excel files
In the Default Values settings page you can enter a value or select and external value for a selected field
Clicking the “external value” picker icon will open the “Select external value” popup
In this popup window you will see all the available external values that match your field type (in this example it’s a DateTime field)
An external value looks like a function; it can have parameters and returns a value of a defined type.Parameters are surrounded by brackets [].
To select an external value simply click it, it will appear in the “Value” textbox
Now, you can replace the [Product] parameter with a fixed value such as: GetProductInventory(3) for example, or you can provide a dynamic token such as [Today], [ListId], [ListTitle], [Me], or any column from your list surrounded by [].In this example we want to pass the column “Product” as parameter to the external value so we leave it as-is.
To select an external value simply click it, it will appear in the “Value” textbox
Now, you can replace the [Product] parameter with a fixed value such as: GetProductInventory(3) for example, or you can provide a dynamic token such as [Today], [ListId], [ListTitle], [Me], or any column from your list surrounded by [].In this example we want to pass the column “Product” as parameter to the external value so we leave it as-is.
After you’ve selected your external value, click validate to make sure your external value is formatted correctly, then click OK.
After you click OK, you’ll see the selected external value as the default value, all left to do is click the “Add Default Value Rule” to add this default value rule to your form.
External values are stored in a hidden list in the site collection level.
To access the list of external values, click the “click here” link in the Select external value popup, this will open a new page showing all the existing external values in the current S.C
This page is accessible only to users who have the permission to access this list. If you want to manage this list’s permissions to enable other users to access this list, click the link at the bottom of this page.
The External value management page displays all available external values, and allows you to edit, delete and add new external values.
To edit an external value click the external value’s link. To add a new external value – click the “add a new external value” button at the top of the page.
Adding/editing an external value, fill-out the following fields:
NameSpecify a clear and descriptive name for this external value.
The name must follow function naming convention (letters, numbers and _ only, no spaces or other special characters), example: GetProductFromCRM. Once you create the external value, its name cannot be changed.
DescriptionEnter a description for this external value that will make it easier for other users to understand when and how to use it in their solutions.
Url (with query string if needed)Please provide the URL address of the service you wish to get the data from. You can use tokens such as [Today], [ListID], [ListTitle], [Me] or any column from the item surrounded by [] anywhere in the URL or query string.
Built in servicesKWizCom Forms includes 2 sample services you can use right out of the box:
Get value from remote list item by item IDGet value from remote list item by specific valueGet value from SQL databaseGet value from Oracle databaseGet value from excel file
Clicking each of these links will populate the URL text area with the selected service’s url.For a more detailed description and usage examples of these built-in services, simply click the ? icon next to the Url text are.
Request body/dataoptionally, if your request requires a body to be sent - please provide the value for the request body here.You can use the same tokens as for URL parameter. Also, if your query string to our built-in services gets too long, you can drop it and place it here instead. Just move everything after the “?” character (without the “?” character) to the request body.
User nameoptionally, if your request does not accept anonymous calls, provide the login information here. Both the user name and password will be encrypted in the database.
* Some authentication providers are not supported. Contact our support if you are facing an issue with this.
Passwordoptionally, if your request does not accept anonymous calls, provide the login information here.
Both the user name and password will be encrypted in the data base.
Expected data type returnedSelect the data type this external value should return.
Cacheabilitythis property defines for how long to cache the results of the external value.
If your data does not change frequently, a higher number will get better performance.
After you have filled-out the form you need to validate your external value (make sure it really works as expected).
Click the “Validate” button.