Skip to main content
Version: v11.6.2

Building Rating Widget using Static Variable


Data for the Rating widget can come from a Variable - Static, Live etc.. In this example, we will see how to use a Static Variable as the data source for a Rating Widget. The process is same for all types of Variables.

  1. Create a Static Variable of Entry Type, with Is List option selected and using the following JSON structure:
[
{
"name": "Poor",
"dataValue": "1"
},
{
"name": "Average",
"dataValue": "2"
},
{
"name": "Good",
"dataValue": "3"
},
{
"name": "V. Good",
"dataValue": "4"
},
{
"name": "Excellent",
"dataValue": "5"
}
]

rating_usage_statvar

  1. Drag and drop a Rating widget
  2. Bind the Value Dataset property to the Static Variable created above and set the Data and Display Fields to the respective fields within the Variable.

rating_usage_statvar_bind

  1. Set the properties for Default Value, Maximum Value and Show captions according to your app requirements.
  2. Run the app.

See Also

Rating Widget Use Cases
How to build Rating widget from static data
How to build an interactive rating widget