A web service is a software system designed to support interoperable machine-to-machine interaction over a network. In ClaySys AppForms you can connect to the webservice to read/write data unless you have restrictions from the server to have the connectivity to the webservice from the server.
Here we will be using a webservice called ‘Currency Convertor’, to get the conversion rate from one currency to another currency. The label will display the currency conversion rate of two countries from the two combo boxes, also we can calculate the equivalent amount of money based on this conversion rate in the textboxes. If we select the currency codes of countries from the two combo boxes, two text boxes available in the right side of the page will be enabled. We can enter currency amount in one of the text box and the other will give the corresponding amount based on the conversion rate.
- SharePoint 2013
|List Of Forms Used|
|WebService Form Design Rule Design||WebService form is used to get the conversion rate from one currency to another currency. Also we can calculate the equivalent amount of money based on this conversion rate.|
The rules section is the most powerful section in the AppForms. The rules can be configured using the Rules Engine. The rule named ‘GetcurrencyConversionRate’ is basically the DataSource select operation of webservice. Based on the two conditions shown in the figure, the textbox controls can be enabled/disabled and the values of ‘ConversionRateResult’ are populated from the webservice also fills the values of ‘Equivalent amount’ label controls on comboboxes (‘cmbCountry1’ and ‘cmbCountry2’) trigger. This process is converted into concise, yet readily understood rule expression statements that represent the underlying execution logic of the form as shown in the figure.