Skip to Content

Validation Question - 2

I have the field called Street address (TEXT field, 40 CHRS long)

I need to do the following validations :-

1. IF the street address has PO BOX address then the format shouldbe u2018PO BOX #u2019 otherwise it should error.

2. If the street address has number(street number) in it then the format should be u2018Street numberu201D then u2018Street Nameu201D otherwise it should error. Example, 100 Main Street u2013 correct format

Anyone can help me to code this expression?. I will reward full points.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 04:14 AM

    Hello Mike ,

    Kindly explain the scenaio with example.Also if in the second case the street number is of only 3 digits and if there is a space between street number and street name.

    Please give details so that i can help you.

    Rgds

    Ankit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 05:05 AM

    Hello Mike,

    If in the second case there are only 3 digits on street number.

    Then u can try this one

    HAS_ALL_CHARS( MID(‪Street add‬,1,3),"0","9") AND HAS_ALL_CHARS( MID(‪Street add‬,3),"a","Z")

    And if there is a space between street number and name and no of digits in street number is not constant then try this

    HAS_ALL_CHARS(MID(Street add,1,FIND(‪Street add‬," ",1)),"0","9") AND HAS_ALL_CHARS( MID(‪Street add‬,FIND(‪Street add‬," ",1)),"a","Z")

    Hope this may help u.

    Rgds

    Ankit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 05:34 AM

    Mike,

    What you need is called address parsing/standardization. Looking broader, You may end up with addresses that "PO Box" is written in a different language, countries where standard street address does not begin with the building number, valid US addresses that are none of both your examples, or addresses where building number is writen as a word (Ten main street).

    Address parsing/standardization and also validation of addresses are basic commodities and this market is flooded with solutions. These solutions can handle the challenges mentioned above with one hand tied behind their back.

    Back to MDM: MDM can integrate with such solutions at the workflow level. For additional information look for enrichment controller component in the SDN or in the marketplace.

    Edna

    Edited by: Edna Naaman on Jun 17, 2008 9:01 AM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.