30
Views
6
Comments
[OutSystems UI] Progress Bar
outsystems-ui
Reactive icon
Forge asset by OutSystems

I need a progressbar to be developed on all the pages in the application.

For every 1 sec it should be like 10%,20%,30% and so on and when the page finishes loading it should 100% . Can anyone    please help on this or share the oml to better understand how to fix this.                              
2024-02-16 11-58-28
Sheikh Mohd Fahad

Hey @Akshata Tallur,

Use a global progress bar in the Theme/Layout.

  • Increase progress by 10% every 1 second using JavaScript (setInterval)

  • On page load complete (window.onload), set it to 100% and hide it

Note: OutSystems doesn’t provide real page-load percentage, so this is a simulated progress bar (standard practice).

2024-10-05 13-30-20
Huy Hoang The

Hi @Akshata Tallur ,

You can follow below:

1. Use Progress bar in Layout and 1 local variable to store the value of progress bar

2. Use JavaScript (setInterval) to change the local variable every sec in OnReady

* And remember to remove JS from OnDestroy. 


2025-12-22 13-50-43
Sherif El-Habibi
Champion

Hello,

I added an answer earlier but deleted it, as I initially thought you were asking about the ProgressBar in general. For this specific use case, I don’t think it’s possible.

The ProgressBar is a DOM element, and while the application is still initializing, the DOM is not ready yet. What you’re trying to achieve is to display the ProgressBar at the very beginning, but at that stage there’s no indication of actual progress. Additionally, even if you found a way to display it during initialization, there would be nothing to use to increment the bar, since everything is happening in the background.

2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated

To implement a progress bar that updates every second and reaches 100% when the page finishes loading in OutSystems (using O11), you can follow these steps:

  1. Drag the Progress Bar Widget: Go to the Toolbox in Service Studio, search for the Progress Bar widget, and drag it onto your screen's Main Content area Progress Bar.

  2. Add a Local Variable: Right-click your screen name and add a local variable (e.g., ProgressValue) to represent the percentage. Initialize its value to 0 Progress Bar.

  3. Set Progress Bar Properties: Select the Progress Bar widget, and set the Percentage or Progress property to the ProgressValue variable.

  4. Preparation Logic:

    • Add a Preparation to your screen logic.
    • Initialize the ProgressValue to 0 in the Preparation.
  5. Add Timer Logic:

    • Create a Client Action named UpdateProgress.
    • Inside UpdateProgress, add logic to increase the value of ProgressValue every second. For example:
      If ProgressValue < 100 Then
          ProgressValue = ProgressValue + (UpdateInterval / TotalTime) * 100
      Else
          End Timer
      
      Set UpdateInterval as the time between updates (e.g., 1000 milliseconds) and TotalTime as the time it takes for the progress bar to reach 100% Progress Bar.
  6. Use JavaScript Timer:

    • You can use JavaScript to trigger updates every second by calling your UpdateProgress Client Action using setTimeout or setInterval.
  7. End Timer: Add a condition to stop updates (e.g., when ProgressValue reaches 100), stopping your logic when the loading is complete Progress Bar.

  8. Animation (Optional): Use the OptionalConfigs.AnimateInitialProgress property of the Progress Bar widget to animate the filling from 0% to the current value Progress Bar.

After implementing this, publish the module, test the page, and you should have a functional progress bar that updates every second and reaches 100% when the page is fully loaded.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
2025-01-24 02-53-49
Mustafa Emad Shaker

Hi @Akshata Tallur,

Here is a sample for the described requirements.

1. Find Shared WebBlock

We need a shared webblock in all screens to add the progress bar in it. So that the logic is applied in all screens.

In my case, I choose LayoutTopMenu.

2. Define Interval to Update Progress

The next step, is to add the logic that shall increase the progress every second. We shall use setInterval() function in Javascript.

Define the setInterval() in the OnReady of LayoutTopMenu, and save the interval Id so that we can stop the interval when the progress reach 100%.

3. Add Progress Bar

In the Widget Tree section add the progress bar.

I recommend using CSS to hide and display the layout content/progress bar, instead of using If widget. As OutSystems runs scripts on the layout, and my cause errors if these elements did not render.

4. Clearing Interval

We need to stop the interval when the progress reach 100%. All you need is to check the progress in the setInterval() triggered action.

Also, stop the interval in the OnDestory block event. As the screen may be destroyed before the progress reaches 100%.

You can apply your style for the progress behavior. For me I prefer to use a progress circle with the progress percentage in the middle.

Finally, you can find a demo, for both progress bar and circle, attached to this reply.

Regards,
Mustafa.

ProgressCircleOnScreen.oml
ProgressBarOnScreen.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP

it blows the mind how everybody just ignores the elephant in the room : you don't know upfront at what time it will be 100%, so you are by definition lying to your user.

She will be either happily surprised that it jumps from 30 to 100, or sadly disappointed that it just sticks at 100 (or maybe you device a special 99 for this) for several second before actually being done.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.