Skip to main content

refresh display form

Comments

6 comments

  • Berend Veldkamp
    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
  • Permanently deleted user
    Thanks. But I am not looking to close the Display form. Instead would need to repopulate the listbox.
    0
  • Berend Veldkamp
    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
  • Ryan Cooney
    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.

     

    --Ryan
    0
  • Permanently deleted user
    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
  • Berend Veldkamp
    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 while

     

     

     
    0

Please sign in to leave a comment.