Search.../

value

Sets or gets a progress bar's value.

Description

Setting the value property sets the current value for the progress bar and updates the displayed progress indication to reflect the progress as a percentage of the targetValue.

The value property can be set to any number greater or equal to 0. Setting value to a number greater than targetValue can be used to indicate that a goal amount has been surpassed.

Getting the value property returns the current value.

Notes:

  • If a progress bar is connected to a dataset, setting the progress bar's value in code does not set the value of the connected field in the dataset.

  • To change the value in the connected dataset, set the field's value using the setFieldValue() function.

Type:

numberRead & Write

Was this helpful?

Get a progress bar's value

Copy Code
1let progressValue = $w("#myProgressBar").value; // 42
Set a progress bar's value

Copy Code
1$w("#myProgressBar").value = 42;