> For the complete documentation index, see [llms.txt](https://docs.servoy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.servoy.com/guides/develop/application-design/ui-components/visualization/progress-bar.md).

# Progress Bar

{% hint style="info" %}
*<mark style="color:blue;">**Content under construction**</mark>*
{% endhint %}

The Progress Bar component shows a progress bar that can be used to indicate the progress of lengthy processes.

Example:

![Progress Bar](/files/8fEcpoMfgWLXBFcC9Px8)

## Table of contents

* [Progress Bar properties](#progress-bar-properties)
* [Progress Bar API](#progress-bar-api)

## Progress Bar properties

Progress Bar properties can be found [here](/reference/servoyextensions/ui-components/visualization/progress-bar.md#properties)

## Progress Bar API

Progress Bar API methods can be found [here](/reference/servoyextensions/ui-components/visualization/progress-bar.md#api)

### [setProgress](/reference/servoyextensions/ui-components/visualization/progress-bar.md#setprogress)

Updates the progress, optionally setting the given value text

### [updateProgressBar](/reference/servoyextensions/ui-components/visualization/progress-bar.md#updateprogressbar)

To update the progress bar you should update the value of the progress bar.

`elements.myProgressBar.value = 60;`

Please note that runtime changes to element's properties are not pushed immediately to the UI. To reduce the number of the round-trip server to client, Servoy keep track of the runtime changes and push them to the client as soon the method thread is terminated or as soon an updateUI is forced. An updateUI can be explicitly invoked with application.updateUI().

The function below updates the progress bar only once the execution is terminated.

```javascript
function onAction(event) {
 // UI is updated only when the the loop is over; there is 1 round-trip server to client
 for (var index = 0; index <= 100; index++) {
   elements.bs_progressbar.value = index;
   application.sleep(50);
 }
}
```

This function behave differently then the function above, updating the progress bar at each iteration.

```javascript
function onAction(event) {
 // UI is updated at each iteration. There are 100 round-trip to server to client
 for (var index = 0; index <= 100; index++) {
   elements.bs_progressbar.value = index;
   application.updateUI();
   application.sleep(50);
 }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.servoy.com/guides/develop/application-design/ui-components/visualization/progress-bar.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
