How to solve problems with ProgressCircleFraction

Hello people...

I'm new to OUTSYSTHEMS and I need your help.

I have a mobile application and I put a CONTAINER with PROGRESSCIRCLEFRACTION.

I managed to resize it, the count is correct and now I have the following problems...

Notice that for each item on the list, the PROGRESSCIRCLEFRACTION must appear and it is appearing.

1 - I need that when I click on the START button the countdown starts and this is already being done, however, when I click on this button, the count is performed on all items in the list, but I want PROGRESSCIRCLEFRACTION to do its function only on the first item when clicked. At the end of the countdown for this item, I need to send a message that the counter has ended. When clicking on the second item on the list, it will do the same thing, the countdown will be performed for the second item on the list and when it finishes, the message will be sent that the counter is finished and so on, however, the user can click on more than a START button for counting to be done for the clicked item.

2 - If the user clicks on the cell phone button to go back to the previous screen and again access the screen with the items, the counter is being reset and cannot, it must continue with the countdown of that item in the list.

I hope I was clear and I count on your help. Thank you and follow the file for a better understanding...

Marcelo Sampaio.

Hi Marcelo,


What variable is your countdown circle connected to? 

I think the best thing you can do is to put this countdown circle in a webblock, give it the parameter to set the progress and the logic to perform the countdown. You can then place the webblock inside the list for separate countdown behaviours.

If you want the countdown to continue after the user leaves the page, I would store a starttime of your countdown instance somewhere (local DB) and let it run for a certain amount of minutes, but based on the starttime stored in your database it will be possible to resume the countdown after the user leaves the page and comes back. 

Hello BAS,

Thanks for responding and showing interest in helping.

I have two local variables on the TAREPROD1 screen to feed the PROGRESSCIRCLEFRACTION, they are:

TOTALSECONDS = 1800 (equivalent to 30 min)

COUNTER = 0 (counter for regression) + 1

In the action of the INICIAR button, there is the execution in JAVASCRIPT and it calls the TIMER action.

Unfortunately, I have no idea how to create a WEBBLOCK as I am new to OUTSYSTEMS. Your information would be clear to someone who knows it well, but I don't. Would you help me? Follow the file again...

BellaNapoli.oml

mvp_badge
MVP

Hi Marcelo,

I have checked the shared .oml file, based on that I would suggest to include the below code changes.

Code Changes:

1) Introduce an adhoc attribute (e.g. Counter with value 0) in the GetProducao1s Aggregate as shown below

2) Map the newly introduced Adhoc attribute i.e. Counter, to the Progress Circle Fraction widget Numerator property as shown below

3) Introduce an input parameter called RowIndex to the IniciarOnClick & Timer client action and pass the list current row value

4) Pass the RowIndex value to JavaScript node as input parameter and to the invoked Timer action as an argument

See this sample screen: ProgressCircleDemo

Refer to the attached .oml file for more clarification


I hope this helps you!


Kind regards,

Benjith Sam

BellaNapoliCC.oml

Hi Benjith,

I'll check your suggestions and the attached .oml file and post the conclusion.

Thanks,

Marcelo.

Hi Benjith...

Thank you again. I opened your file and the countdown timer is working perfectly, but...

Problem 1 - If the user goes back to the previous screen and again back to the screen with the counter, it is zeroed, and should continue the countdown or that he doesn't change screens until he finishes his tasks. (This second option is better) and after all the tasks are finished, it goes back to the HOME screen.

Problem 2 - If the countdown timer does not finish and the user ends the task by clicking the FINALIZAR button, the counter automatically resets and it should stop and return to its initial stopped status.

Hi Benjith, 

Could you send me this .oml file that I consulted here so I can see how the total fabric procedure works?

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