29
Views
5
Solved
###### Progress Bar questions.
Question

Hi,

I need a progress bar and a bar that is 100% and decreases its value depending in something.

Also didnt understand how can I tell waht is 100%.

Imagine I click a button and add 1 to a variable.

If I click 100 times the bar will fill to 100%

But if I want to say that I need to click 10.000 times for the bar to reach 100%?

and also how to apply that backwards, starting with 100% and going until 0.

Also Can I get that information? lets say I create an IF saying: If bar is 40% do something.

Kind regards,

Pedro Boffa

Champion
Solution

Good questions. Is this a good example of what you want to do?

Right now you don't have a change event on the widget but that doesn't mean you cannot do logic outside of the progress bar, in this case when you click on a button

https://marcio-carvalho4.outsystemscloud.com/tab/Progressbar?_ts=637798909144424471

MVP

Hi @Pedro Boffa,

You haven't mentioned whether it's a Traditional Web or Reactive application, but there's documentation on how to implement both patterns: Traditional Web and Reactive.

In both cases, the value you use should be a percentage (an integer number between 0 and 100), and since you can pass it an expression you can dynamically change its value at runtime (both to increase it and to decrease it).

If you want it to represent 10000 then you need to assign a value between 0 and 100 to the Percentage/Progress property of the ProgressBar pattern (in this case, that could be achieved by dividing whatever number represents the number of clicks by 100 so that 10000 / 100 = 100%).

If you want to know the current value being displayed, you'd store it in a variable and pass that variable as the value of the Percentage/Progress property.

Hope this helps!

Champion
Solution

Good questions. Is this a good example of what you want to do?

Right now you don't have a change event on the widget but that doesn't mean you cannot do logic outside of the progress bar, in this case when you click on a button

https://marcio-carvalho4.outsystemscloud.com/tab/Progressbar?_ts=637798909144424471

Champion

Hi,

As progress bar is percentage, so everything must represented as percentage.

As example, want to 50 click for 100%, so single click will yield 2%

For 10.000 click for 100%, single click will 0.01%

Formula for single click : 1/[max number] * 100%

On Outsystems (I use Reactive App for example) you can use Progress Bar widget

on the click me action, do the formula above

Hi,

Thank you very much everyone for your time and help.

I will test all those possibilities and will give here a feedback.

Kind regards,

Pedro Boffa

Hi,

Apreciate the time and help from everyone.

I tested  Márcio Carvalho way and worked great.

Thank you everyone.

Kind regards,

Pedro Boffa

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