Tips_gui   >   Windows   >   Working Messages
Omnis Studio provides a working message which you can open to notify the user whenever an operation is going to take some process. If you are looping through a list of records you can recalculate the working message text to include the current line being processed and the number of lines to be process. If you recalculate the working message text, you must redraw the working message.
Calculate cWorkingMssg as con("Looping through list...")
Working message {[cWorkingMssg]}
For %N from 1 to cCount step 1
Calculate cList.$line as %N
; We are looping through the list.
Calculate cWorkingMssg as con("Looping through list...",kCr,%N," of ",cCount)
Redraw working message
End For
Working messages will reduce performance in a loop each time you redraw a working message. You should avoid redrawing a working message every time around the loop. Use the mod() function to only draw the working message every 100 or 500 records depending on the size of the list and the speed which the loop is expected to be processed.
Calculate cWorkingMssg as con("Looping through list...")
Working message {[cWorkingMssg]}
For %N from 1 to cCount step 1
Calculate cList.$line as %N
; We are looping through the list.
If mod(%N,500)=0
Calculate cWorkingMssg as con("Looping through list...",kCr,%N," of ",cCount)
Redraw working message
End If
End For