How to manually set Progress:Thermometer in a Process?

Using the Process template. The process reads several child tables and I want to calculate and update the Progress:Thermometer and ?Progress:PctText while processing the child records. But I can not figure out where or how to update the fields.


In the take record embed.
Calculate and set the value of the thermometer.
?Progress:Thermometer{PROP:progress} = x
If you assign a USE variable to the progress bar, then just set that variable.
Chris C

thank you for the answer
In the TakeRecord PROCEDURE I read maybe only one record and then starts to read and process the child records. It’s when I process the child records I want to calculate the Progress:Thermometer and Progress:PctText. If I while reading the child records change the ?Progress:Thermometer{PROP:progress} and ?Progress:PctText{prop:text} the fields on the ProgressWindow are not affected.


Why not add a second progress bar to your screen that would be used to display the child record progress? It would give the end-user a concise view of the overall process progress. Otherwise, you are going to have to do some trickery to get the actual number of records that will be processed. Here is some pseudo-code:

RecCount = ‘Select count(orders) from orders where order_date = today()’

RecCount += ‘Select count(details) from details where order_number in (select order_number from orders where order_date = today())’

ReCount then becomes the total number of records to process. You would increment RecordsProcessed with each order and detail processed.

Maybe try a DISPLAY()

FYI: ?Progress{PROP:RangeHigh} and ?Progress{PROP:RangeLow} can be useful
Also beware of the data type of your USE variable. IIRC some of the templates used (still use?) a BYTE

Thank you both for your answers.

The PROP:{Pangehigh} did the trick for the ?Progress:Thermometer, and a DISPLAY() did the same for the ?Progress:PctText{prop:text}.