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.

Phone Dash

This custom JavaScript automatically inserts dashes as the user enters a phone number into a Phone control. Characters other than the dash entered into the control are deleted. Add PhoneInsert to the CSS Class property of the Phone control to enable this JavaScript. 

...

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
languagejavascript
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("<yourhttps:// frevvo server host:port>/frevvo/web/tn/<your tenant>/user/"
    

...

+ document.getElementsByName('username')[0].value + "/app", "_top");
    }
}

...

setTimeout(saveTask, 500); // set the initial timer

 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
languagejavascript
if (form.load) { 
  username.value = _data.getParameter('subject.id');
}

Phone Dash

This custom JavaScript automatically inserts dashes as the user enters a phone number into a Phone control. Characters other than the dash entered into the control are deleted. Add PhoneInsert to the CSS Class property of the Phone control to enable this JavaScript. 

Code Block
var CustomEventHandlers = {
       setup: function (el) {
           

...

if (

...

CustomView.hasClass(el, 'PhoneInsert')) {
               FEvent.observe(el, 

...

'keydown', this.formatPHONE.bindAsObserver(this, el));
               

...

FEvent.observe(el, 'keyup', this.formatPHONE.bindAsObserver(this, el));
           }

     

...

 

...

 },
formatPHONE: function (event, element) {
           if (event.keyCode != 46 && event.keyCode != 8) 

...

{
  

...

 

...

 

...

 

...

 

...

         fldVal = $(element).value;
        

...

       var nom = fldVal.charAt(fldVal.length - 1);
               if 

...

(isNaN(nom) 

...

&& nom != "-") {
                   $(element).value = fldVal.substring(0, fldVal.length - 1);

...


      

...

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
languagejavascript
saveTask = function ()         } else {
                   if ((document.getElementsByName('temp')[0].valuefldVal.length == 3) || (fldVal.length == 0) {7)) {
                       document.getElementsByName('temp')[0]$(element).value = fldVal + "saved-";
                 UberController.valueChangeObserver({target:document.getElementsByName('temp')[0]},  }
                   if document.getElementsByName('temp')[0].parentNode.parentNode);(fldVal.length > 12) {
          FlowView.getSaveButton().click();     alert ("Task added to task list");   $(element).value = windowfldVal.open("<yourhttps:// frevvo server host:port>/frevvo/web/tn/<your tenant>/user/"substring(0, fldVal.length - 1);
        + document.getElementsByName('username')[0].value + "/app", "_top");          } }
setTimeout(saveTask, 500); // set the initial timer

 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
languagejavascript
if (form.load) { 
  username.value = _data.getParameter('subject.id');
}         }
           }
       }
   }