Script Examples
The above system columns do not create bound controls during form initialization.
You can get the values though through script and set these values inside your custom controls through script :
You should add the following script in the…
Script Example : Setting the datasource of controls through script
In order to have filtered dropdowns, the most common approach is to use the Constraint feature of PowerForms which enables automatic filtering of a dropdown control (see this link for details)
There are cases though when you want to manually…
Script Example : Calculate average value for a query resultset
For this example, we want to dynamically load data from a SharePoint list, loop through the resultset and calculate the average value of a specific column in the resultset:
To build our script, we assume the following :
- We have a list…
Script Example : Using Script to Save List Items
There are cases when the complexity of your business cases require that you need to take over and save list items manually.
Besides controlling how data are saved through a normal PowerForms designed form, or by using the ListAndForm control…
Set Default Values
The Default Value property is used to set the value of the control for new records.
The default value can be either static or calculated.
For static values, just enter the required value in the default value field. For labels…
Define Calculated Fields
By setting a field to be calculated, you have to define the calculation formula for the field values.
Moreover, you can use formulas in the "Visibility formula" and "Enabled formula" properties.
Whereas in the Calculation formula should…
Dynamically set the data source of a choice control
There are cases when the data source of a choice control depends on the value of another control on the form.
For example:
You have a multi-choice field with the associated company departments for a support request, called c_Department.
You…
Using Iron Python Scripting in PowerForms
Python scripting is a powerful tool for your customizations.
You can find here some common scripts you can use in your forms.
IMPORTANT: Python uses "Significant Whitespace", meaning that whitespaces in front of commands are important…