Sharing of useful functions to support contact data validation

Danny Roden
Danny Roden Administrator
edited December 2023 in General

Hi all,

I've found myself using a few functions on a regular basis so thought I'd share them on here in case they are of benefit to anyone else.

The attached .dmx file contains the following functions:

  • Free from PCI info (checks an input does not contain 16-digit numbers either together or separated by hyphens or spaces every 4th character)
  • Valid Country (this is a simple function that checks the input country matches a small list of 'valid' values) in practice you may be better swapping this for a lookup against a larger list.
  • Valid Email Format (or null) - a subtle edit to the default email format checker which permits null values as valid


  • Valid Phone Format (or null) - a subtle edit to the default international phone format checker which permits null values as valid
  • Valid Name Casing Sub-function (Surname Case Correction) - Standardises casing for surnames, including handling of: Scottish names (e.g. McNeal and MacAllister), Irish names (e.g. O'Hara) and Double-Barrel names (e.g. Smith-Jones) as well as any with 1st and 3rd chars capitalised on input e.g. "DeFazio")
  • Valid Name Casing - Evaluates if Name data is standardised using proper casing (e.g. "McDonald" is deemed VALID, whereas "Mcdonald" is deemed INVALID) by comparing the input value to the 'standard form' using the above function.
  • Valid Name (does not contain invalid characters) - Checks name values for invalid characters (i.e. anything other than letters, full stop, hyphen and apostrophe)

Feel free to use as you like and let me know if you have any ideas for improvement, other functions you've built with respect to evaluation and cleansing of contact data.

Cheers,

Danny

Comments

  • Hi Danny,

    thanks for sharing interesting functions. Unfortunately I had a challenge while trying to import the.dmx file.

    Error message during the process:

    "Unable to process the supplied DMX file.

    - Invalid object structure for Function 'Valid Name Casing Sub-function (Is 3rd Letter is Capitalised)'.

    - Invalid object structure for Function 'Valid Name Casing Sub-function (Correct casing for char 1&3)'.

    - Invalid object structure for Function 'Valid Name Casing Sub-function (Correct Double-barrel name case)'.

    - Invalid object structure for Function 'Valid Name (does not contain invalid characters)'.

    - Invalid object structure for Function 'Valid Name Casing Sub-function (Surname Case Correction)'.

    - Invalid object structure for Function 'Valid Name Casing Sub-function (Correct casing for chars 1&4)'.

    - Invalid object structure for Function 'Valid Country'.

    - Invalid object structure for Function 'Valid Phone Format (or null)'.

    - Invalid object structure for Function 'Valid Name Casing'.

    - Invalid object structure for Function 'Valid Email Format (or null)'.

    - Invalid object structure for Function 'Free from PCI Info'.

    Any idea what is the reason behind? We have version Aperture Data Studio (2.1.1.486)

    BR,

    Juha

  • Akshay Davis
    Akshay Davis Experian Super Contributor

    @Juha Ritvas It is most likely because the dmx was generated in a newer version of Data Studio. That dmx was exported from 2.1.8, so you would need to upgrade to use it.

  • The upgrade solved the challenge - thanks