refresh display form
Hi I am using Essentials 4.11 and HTML5 Viewer 2.12.1
I have a requirement to display a list with selected field values plus a count summary in a viewer. The map will also shows polygon corresponding to the list. The map, list and summary must be refreshed every say minute.
Also, the selection on the list must change and the map zoomed to the selection continuously
I have tried to do this using a workflow by using a QueryTask to get list of records, then use a display form to create a list and text boxes. I am using ExternalDelay within a while loop to run QueryTask and refresh the Display form. However this doesn't work.
Has anyone tried to refresh a display form automatically ?
Alternatively, any other suggestions how I can present a dashboard type with a list and summary counts in the Geocortex Viewer ?
0
-
A DisplayForm can only be closed by a user clicking on one of the buttons. If there is no user interaction required, you could use a Configure Workflow Container activity, but its layout options are rather limited. This is what I often use to show a 'percentage done' for long running processes. 0 -
Thanks. But I am not looking to close the Display form. Instead would need to repopulate the listbox. 0 -
That is not possible with Workflow 4. A Display Form or a Configure Workflow Container is initialized once, then shown. If you want to change anything in such an activity, you must close and reopen it. Or build a custom module (in JavaScript). 0 -
The only way I can think of to make this work without a custom module (as Berend suggested) would be to use a startup workflow that runs in a loop. Every minute it would use the Run Command activity to run the "RunWorkflowById" command to run another workflow. This second workflow would show the form with summary information. On subsequent runs of this second workflow it would automatically terminate and replace the previous form with a new one with current summary info. Technically this could work, but it is complicated and could be quite jarring to the end user when the form is replaced.
I think the custom module approach would be much cleaner.
--Ryan0 -
Hi Ryan, Berend,
Running the second workflow from main workflow seems to work, although I need to do some more testing.
Now I need to select each item in the list on form and zoom map to the corresponding feature. This will be done say every 10s until the form is re-loaded.
Can this be done in runtime modifications. i.e. loop through list, set a delay, select item in list and recenter map ?0 -
No. The Runtime Modifications section is run once (on the server), before the Display Form is shown. Having a loop there will prevent the Display Form from being shown in the first place.
As Ryan suggested, you need to call the workflow containing the Display Form from within a loop from another workflow. Make it so that the Display Form WF is called every 10 seconds, and pass the feature you want to zoom to, to the 2nd workflow, as a parameter. After you have looped over all features, update the list in the 1st workflow.
Here's some pseudo code for the first workflow:While true (endless loop) features = GetFeatureFromSomewhere for each feature in features Call2ndWorkflow (with feature as parameter) Wait(10 seconds) next End while0
Please sign in to leave a comment.
Comments
6 comments