Animation while waiting for PSOS to complete

Can I create an animated progress bar while running a script on server with "Wait for completion" enabled? It doesn't need to actually track progress. It just needs show some sort of animation so that the user knows the database is working.

The only solution I know of is using gifs in a web viewer, but they don't see to animate while waiting for the script to complete. I know you can choose to not "Wait for completion" and instead prevent the user from doing stuff by putting them on a layout that doesn't have data entry fields, buttons, etc..., but I'd prefer to not do that.

I haven't found a way to do this that I fully trust. It always seems either frozen or glitchy.

It's been a while since I tried, so maybe there's some new reliable approaches now.

EDIT: I should clarify, when "wait" is enabled, there are ways to poll for PSOS completion with "wait" disabled.

EDIT 2: one thing to try if you haven't, is to pause briefly refresh your webviewer before calling PSOS. But I wouldn't hold my breath.


I've seen a few implementations of progress bars, including with JavaScript,but they all rely on running that in a separate thread. You would have to periodically update the progress bar from FMS to display the current amount done.


on macOS, I found a small gif (31kb) in a web viewer works well. The gif is local; installed at startup into temp directory.

Looking at the script I see a pause step:

  New Window [ Style: Card ; … 
  # pause reduces visual load noise
  Pause/Resume Script [ Duration (seconds): 1 ] 
  Perform Script… 


Thanks everyone. These are all great methods that I've tried before. Unfortunately, I'm still on the same page as jwilling:

It always seems either frozen or glitchy.

Exactly. It's fine if I don't wait for completion and instead "poll for PSOS completion". In that case webviewer gifs animate fine.

Sometimes (especially in a multi-window environment), I just need to be sure the user isn't locking other records while the PSOS is doing its thing. Capturing errors is enough of a pain as is.

1 Like

Javascript is the way to go rather than a gif.

Attached is an example of a basic javascript slider to illustrate it animates independent of what's going on with a PSOS. Obviously you would find a more suitable control that loops (its entirely possible this one does but I didn't go into its documentation).

u/p is admin for the file

js_slider_psos.fmp12 (324 KB)


Awesome! [Edit: Duh! I see you gave u/p at end]. Looking at this file now, thanks.

I don't know why I said "gif" earlier- I actually used someone else's javascript in a webviewer.

Your example file works great! Then I used my own progress bar which I had avoided using with PSOS/Wait in the past, and it also worked, so I'm a little confused. I know I had a reason for avoiding this, but I just can't remember what it was :man_facepalming:.

Anyways, thanks for this file, I'm going to work with this approach again soon.

It may have been the lack of a brief pause before loading the wv ? This was required in order to load the WV in time prior to executing the PSOS - otherwise it didn't work.

Another difference is explicit setting of the WV rather than setting the wv via calculation, that may have an impact.


Great example.

SVG modification attached (96.3 KB)


Adhering to the KISS principal, I just open a floating windows with the word "LOADING....." centered in it, then select window back to the execution context for the PSoS kick off, and once it returned, close the loading window. No animation, but not brittle either. A floating window is always on top (coded to center on the parent window), and can be closed by the user if they so desire (never seen that actually happen - people wait for it to disappear on its' own).

1 Like

a Base64 converted animated gif in a WebViewer works fine for me. Script starts with
set Var [$progressON; Value: 1]
ends with
set Var [$progressON; Value: 0]

WV Object (ProgressBar) with 'HideObjectWhen = $progressON ≠ 1'

1 Like