Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Progress bar (app.thermometer) ???

Avatar

Level 10

Need to display a progress bar using thermomter object while invoking a web service.

Lets assume the function loadWebService() has the logic to connect and retrieve data from a web service.

Can anyone drop a few lines of code to implement this logic??

I have tried the following it doesn't works:

line 1: var tObj = app.thermometer;

line 2: tObj.duration = 100000;

line 3: tObj.begin();

line 4: loadWebService();

//optionally i ve included the following lines too

line 5: for(var i=0;i<100000;i++)

line 6:   {

line 7:        tObj.text = "Processing, please wait";

line 8:   }

line 9: tObj.end();

Thanks,

Nith

1 Reply

Avatar

Former Community Member

Just tried your code and it works for me ...the only thing that I noticed is that you never actual update the progress bar .....if you add the command:

tObj.value = i

to the inside of your loop, then it works as I would expect.

Paul