Search.../

targetValue

Sets or gets a progress bar's target value.

Description

The targetValue is the value at which the progress is complete.

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

The targetValue property can be set to any number greater than 0.

Notes:

  • If a progress bar is connected to a dataset, setting the progress bar's targetValue 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 target = $w("#myProgressBar").targetValue; // 150
Set a progress bar's value

Copy Code
1$w("#myProgressBar").targetValue = 150;