Feed › Forum › Omnis General Forum › SQL Worker and redraw. a subform
-
SQL Worker and redraw. a subform
Posted by Per-Arne Svensson on April 24, 2026 at 2:12 pmHi all,
This is for Omnis 10.22 and remote forms.
I’m new to SQL worker. When stepping through the methods I can see that the lists are populated correctly but they are not drawn on the screen.
According to the Omnis documentation a call to the server is needed but how do I do that?
When I click on a tab and then click back the lists are shown so there is an issue with redraw.Regards,
Per-Arne SvenssonAndreas Pfeiffer replied 1 week, 3 days ago 4 Members · 7 Replies -
7 Replies
-
Hi Per-Arne,
Since the worker do their job on the server side, the $completed method of the worker would need to send a push to the client for synchronising the data. See also: https://www.omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#push-connections
Hope this makes sense.
Best,
Andreas
-
This reply was modified 1 month, 2 weeks ago by
Andreas Pfeiffer.
-
Thanks, that actually helped point me in the right direction.
I ran into something similar recently and the key for me was exactly what you mentioned to https://www.omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#push-connections. Nothing updates on the client unless you explicitly push it. In my case, adding a push from the worker’s
$completed
and then forcing a redraw on the client side did the trick.Per-Arne, you can try something like triggering a client method via push that calls
$redraw()
(or refreshes the subform/list) once the data is ready. Without that, the UI just sits there with the old state until something else (like switching tabs) forces a refresh, which is what you’re seeing.So yeah, it’s not that your list isn’t populated—it’s just never told the client to repaint.
-
This reply was modified 1 month, 2 weeks ago by
-
Thank you Andreas. It works beautiful now. Very happy!
All the best,
Per-Arne
-
-
It sounds like the SQL worker is updating the list data correctly, but the remote form is not being refreshed automatically after the worker finishes. Have you tried forcing a redraw with $redraw() or calling $sendall() after the worker callback completes?
Also, are the lists inside a subform or a complex grid component? Sometimes remote forms need an explicit client refresh when data is populated asynchronously.
-
It sounds like the data is being loaded correctly in the SQL worker, but the remote form isn’t triggering a refresh/redraw until you switch tabs, which usually points to a client-side refresh or server call not being fired after the data update.
https://www.omnis.net/developers/resources/onlinedocs/index.jsp?detail=WebDev/02jsremoteforms.html#push-connectionslevel devil
Are you explicitly calling a redraw/refresh method on the list after the server-side data is returned to the remote form?
-
Andrew,
There is no redraw on an Omnis JavaScript form. But if you are using a worker it means that the $completed method is like an event method that happens on the server. So the variables on the server gets updated but the client has no clue about it.
However you can use the push feature to trigger a client side event. Please check this: https://omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#push-connections
Best,
Andreas
-
This reply was modified 1 week, 3 days ago by
Andreas Pfeiffer.
-
This reply was modified 1 week, 3 days ago by
-
Log in to reply.