Customer Portal

Calculating Postcode Sector from Postcode value

Comments 1

  • Avatar
    novakj
    0
    Comment actions Permalink
    Hi Nikki,

    You can use this transformation expression in your Reformat component:

    function integer transform() {
    $out.0.postcode = replace($in.0.postcode, "([^ ]* .).*", "$1");
    return ALL;
    }

    There is a regular expression which matches everything to the first occurrence of space, one space and one character. I hope it will help you.

Please sign in to leave a comment.