Workflow Soluiton

 View Only
  • 1.  validate on update

    Posted Oct 15, 2012 03:19 PM

    Hi

    is their a way to validate the text in a textbox on update, rather than using the output paths?

    this would be really useful to me .

    I'm using custom validation but it only seems to kick in when one of the output paths is triggered

    I'm hoping I've just missed something obvious

     

    C

     



  • 2.  RE: validate on update

    Posted Oct 15, 2012 04:23 PM

    Have you tried using any Custom Event javascript (Functionality tab, Behavior category, Custom Events)? Can you give an example of what you're trying to accomplish?



  • 3.  RE: validate on update

    Posted Oct 15, 2012 04:42 PM

    Hi sorry not up to Javascript

    what I'm trying to achieve is to validate and email address to a specific provider eg "something.net"

    I can get it to work but only when one of the output  paths is triggered, i would ideally like it to validate after the field is completed something like "lostFocus" action

    hope that makes sense

    thanks

     

    c



  • 4.  RE: validate on update

    Posted Oct 16, 2012 04:18 AM

    Check if you web control is not ignored for output path not triggering validation.



  • 5.  RE: validate on update
    Best Answer

    Posted Oct 16, 2012 08:23 AM

    Referencing this old post of mine for a how-to:

    https://www-secure.symantec.com/connect/forums/adding-javascript-clear-intial-value-onclick

    Here's the steps I'd use:

    1. Make the Control ID of the email textbox "myTxtBox" (no dbl quotes) under Functionality / Behavior

    2. Add a AttributeKeyValuePair custom event to the Custom Events in Functionality / Behavior

    3. Make the event onblur, and add the event handler script as follows (per your requirement):


    var myTextBox = document.getElementById("myTxtBox");

    if(myTextBox.value.indexOf("something.net", myTextBox.value.length - 13) < 0)
    {
            window.alert("Email must end in 'something.net'");
    }

    This will popup a message yelling at the user if they enter something that doesn't end in "something.net" for an email.



  • 6.  RE: validate on update

    Posted Oct 16, 2012 01:06 PM

    Hi

    Thanks Reecardo

    Perfect

     

    C