The ProgressBar control
The ProgressBar control can be used instead of a numeric textbox. The value can also by shown as a percentage.
Type : ProgressBar
Name
Provides a unique name for the control.
Binding
Indicates if the control is
- Unbound
- Bound to list column
- Is a label for a control bound to list column
Enabled for new records
Sets if the control will be enabled or disabled when the forms handles a new record
Enabled for existing records
Sets if the control will be enabled or disabled when the forms handles an existing record
Required
Marks the cotnrol as Required.
By default, the system recognizes required fields and marks them with this flag. Additionaly, controls can be marked as required event if the bound column is not.
Enabled Formula
Set an expression then will be evaluated during run-time and enable or disable the control.
The expression must be in javascript and should return a boolean value.
Dependencies between controls are automatically identified and the expression is re-calculated every time a control affecting the formula changes.
Example :
form.GetControl(“c_Status”).GetValue() != “Open” && form.UserInGroup(“Administrators”)
Visibility Formula
Define a valid formula (using javascript) that will be evaluated during runtime to show or hide the control.
The expression should return a boolean value.
For example :
form.FieldValue(“c_Status”) != “Rejected” || form.UserID() == “1”
Value
This property defines how the control will get its value.
Here are the available options :
- The value is Static (this is the default for label controls)
- The value will be provided by the user (Not applicable for labels)
- The value will be calculated by a formula
- The value will be retrieved from a list query
- The value will be provided by a web service call
- The value will be provided by a SQL query
Static value
A static text must be set in the appropriate designer control.
Formula
A javascript expression must be set that will provide the value for the control.
If the formula contains references to other controls, dependencies will be automatically identifies during run-time and the value will be updated to reflect changes.
Example :
form.FieldValue(“c_Active”) ? “Yes” : “No”
There is an additional option that instructs the form to perform calculations only for new records. Existing records will keep their original value.
List Query
A predefined list query is bound to the value of the control. So during form initialization, the specified list query is executed and if it returns any item, it selects the first one and it will apply the value to the label based on the following rule :
If a Field Name has been selected in the corresponding box, that specific column will be used from the list item to fill the control value.
If the Field Name is left blank, the first column retrieved will be used.
Web Service
The same as above, the required web service is selected and after the web service retrieves data, the first item will be used to update the control value. If no Field Name is set, the control will receive the first field of the retrieved item.
SQL Query
Works the same way ListQueries and Web Service works.
Example :
=”User : ” + form.UserFullName()
Width
Defines the width of the control.
When the value is zero, the maximum allowed width will be used.
Please note that you can only change the Slider’s width using the above Layout property and not by adjusting the number of boxes it occupies on the designer view.
Height
Defines the control height.
If the value is zero, the height property will not be set.
Please note that you should also set the control’s height greater than 0.
H.Alignment
Defines the horizontal alignment of the parent cell (values : left, right, center)
V.Alignment
Defines the vertical alignment of the parent cell (values : top, bottom, center)
Fore Color
Defines the fore color of the control
Back Color
Defines the Background color of the control.
Cell Color
Defines the color of the parent cell.
Font Size
Declares the font size of the text
Margin
Sets the margin applied to the control, that is, the spacing between the control and the cell borders.
Font Bold
Changes the weight of the font used
Italics
Changes the font style for the control text
Not Applicable for this control
MinimumValue
Indicates the minimum value for the progress bar.
MaximumValue
Indicates the maximum value for the progress bar.
Decimals
Sets the number of decimals for the displayed value, default is 0.
Decimals
Sets the number of decimals for the displayed value, default is 0.
TextMode
Display the value as the actual value or as a percentage.
TextColor
Set the text’s color.
Sets the script that will be executed at the value-change event of the control.
Example :
var value = form.GetControl(“c_Title”).GetValue();
if (value == “Open”) form.HideSection(“Details”);
else form.ShowSection(“Details”);
Leave a Reply
Want to join the discussion?Feel free to contribute!