Go to previous topic
Go to next topic
Last Post 1/21/2008 4:24 PM by  Rod Weir
Validating custom field data with regular expressions
 0 Replies
AddThis - Bookmarking and Sharing Button
Author Messages
Rod Weir
HelpMaster development team
Helpdesk Hall of Fame
Helpdesk Hall of Fame
Posts:555
Points:1017


--
1/21/2008 4:24 PM

    One of my favourite new features in HelpMaster Pro v8 is the ability to validate the data that is entered into the custom text fields via the use of a regular expression.  This new feature brings a lot of power to the validation of custom fields because a regular expression is flexible enough to cater for just about any type of validation scenario.

    For example, here at PRD Software, we use HelpMaster Pro as our internal helpdesk tool and also for the development team to track bugs and other development tasks.  One of the major pieces of information that we need to capture for this purpose is the HelpMaster Pro version number.  This number is a 4 part number which looks like this for a version 8

    8.0.10.808

    However, we also need to track version 7.5 numbers which are only 3 part numbers, like this.

    7.5.193

    Then we also have version 5 numbers, which are also 3 part numbers..

    5.0.17

    We've created a custom text field in HelpMaster Pro to store these numbers and we've created just one regular expression to validate all three version numbers.  The expression looks like this.

    Not bad for just one line of gobblydy-gook.

    Regular expressions may take a bit of time to master, but the rewards are well worth it.  If you need help, please contact PRD Software.  You can also find some excellent information on the web from sites such as www.regexlib.com, www.regular-expressions.info, or by searching for "regular expressions"

    Best regards,

    Rod

    HelpMaster development team
    Check out the HelpMaster roadmap


    ---