Skip to main content

 

 

 

 

Template:OutSystems/Documentation_KB/Breadcrumb_New_Layout

 

 

Template:OutSystems/OSLanguageSwitcher

 

Applies only to Traditional Web Apps

 

 

OutSystems

Progress Bar

Template:OutSystems/Documentation_KB/ContentCollaboration
  • Edit
    Collaborate with us
    Edit this page on GitHub
  • You can use the Progress Bar to display percentage values by incrementing values in a bar, and to show the current progress of a task flow.

    How to use the Progress Bar UI Pattern

    In this example, we display the percentage of shipped orders from an existing Customer Order Database.

    1. In Service Studio, in the Toolbox, search for Progress Bar.

      The Progress Bar widget is displayed.

    2. From the Toolbox, drag the Progress Bar widget into the Main Content area of your application's screen.

      By default, the Progress Bar widget contains a Title and Value placeholder.

    3. Right-click your screen name and select Add Preparation.

    4. From the Toolbox, drag an Aggregate onto the screen preparation, and enter a name for the aggregate. In this example, we call the aggregate GetTotalOrders.

    5. To add a database entity, double-click the aggregate you just created and click on the aggregate screen.

    6. From the Select Source pop-up, choose the source entity and click OK. In this example, we select the Order database.

    7. Return to the screen preparation, and add another aggregate (See step 4). In this example we call the second aggregate GetShippedOrders.

    8. To add the relevant database entity, repeat steps 5 and 6.

    9. On the aggregate screen, click Filters, then Add Filter.

    10. In the Filter Condition pop-up, add the relevant logic for the filter and click DONE. In this example, to get all of the shipped orders, we add the following logic:

      Order.Status = Entities.OrderStatus.Shipped

    11. Double-click your screen name, and on the Properties tab, from the Percentage drop-down, select Expression Editor. Enter the logic for the Progress Bar and click DONE. This displays the percentage value as the stroke on the Progress Bar.

      In this example, to show the percentage of shipped orders, we add the following:

      GetShippedOrders.Count / GetTotalOrders.Count * 100

    12. From the Toolbox, drag an Expression widget into the Value placeholder, and on the Properties tab, from the Value drop-down, select Expression Editor.

    13. In the Expression Editor, enter the same logic as in step 11 (GetShippedOrders.Count / GetTotalOrders.Count * 100), and click DONE. This displays the percentage value on the Progress Bar.

    14. Add the text you want to appear as the Progress Bar title to the Title placeholder. In this example, we add "Total % of shipped Orders".

    15. On the Properties tab, you can customize Progress Bar's look and feel by setting any of the optional properties, for example, the shape, color, size, and orientation of the Progress Bar.

    After following these steps and publishing the module, you can test the pattern in your app.

    Properties

    Property Description
    Percentage (Integer): Optional Percentage to display. You can use functions or local variables.
    Color (Color Identifier): Optional Progress bar color. Red, orange, yellow, lime, green, blue, violet, and pink are just some of predefined colors available for the badge.

    Examples

    • Blank - The progress bar color is the color you chose when creating the app (default value).
    • Entities.Color.Red - The progress bar color is red.
    Shape (Shape Identifier): Optional Set the Progress Bar shape. The predefined options are:
    • Rounded
    • Soft Rounded
    • Sharp

    Examples

    • Blank - The Progress Bar has a rounded shape (Entities.Shape.Rounded). This is the default.
    • Entities.Shape.Sharp - The Progress Bar has a sharp shape.
    Size (ProgressBarSize Identifier): Optional Set the Progress Bar size. The predefined options are:
    • Extra Small
    • Small
    • Base (default)
    IsInline (Boolean): Optional If True, the value placeholder is placed at the end of the line and the label placeholder is hidden. If False, the value and label of the placeholder are placed over the line. This is the default.
    ExtendedClass (Text): Optional Add custom style classes to the Progress Bar UI Pattern. You define your custom style classes in your application using CSS.

    Examples

    • Blank - No custom styles are added (default value).
    • ''myclass'' - Adds the myclass style to the Progress Bar UI styles being applied.
    • ''myclass1'' ''myclass2'' - Adds the myclass1 and myclass2 styles to the Progress Bar UI styles being applied.
    • Was this article helpful?