Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use the browser information populated in your text control to decide if the section of your form that contains the wet signature should be displayed or not.

Save Screen Flow to Task List

If two sequential workflow steps are assigned to the same person, this creates a screen flow. Screen flows immediately navigate a user to the next screen (activity/step) in the flow when they click the continue button. Sometimes you don't want a user to automatically navigate to the next screen, for example the next activity/step might be something you want the user to perform days after the first step rather then immediately. 

This custom JavaScript will save the flow to the user's task list instead of displaying that next step to the user immediately. The user can then go back to their task list at a future time to resume their task. This JavaScript is effectively clicking the Save button when flow moves to second step. This will create a task in that users task list and then navigate that user to his home page.

Code Block
<script>
/* <![CDATA[ */
saveTask = function () {
    if(document.getElementsByName('temp')[0].value == 0) {
       document.getElementsByName('temp')[0].value = "saved";
               
UberController.valueChangeObserver({target:document.getElementsByName('temp')[0]},
    document.getElementsByName('temp')[0].parentNode.parentNode); 
    FlowView.getSaveButton().click();
    alert ("Task added to task list");
    window.open("https://<your frevvo server host:port>/frevvo/web/tn/<your tenant>/user/"
    + document.getElementsByName('username')[0].value + "/app", "_top");
    }
}
setTimeout(saveTask, 500); // set the initial timer
/* ]]> */
</script>

In order to use this solution you will also need to:

  1. Add a text control named 'temp' to your form and uncheck the visible property to make it hidden.
  2. Add a text control named 'username' to your form and uncheck the visible property to make it hidden.
  3. Add the following business rule to your form.
Code Block
if(form.load) { username.value = _data.getParameter('subject.id');}