Custom Pattern (problem with ampersand &) - InfoPath Dev
in

InfoPath Dev

Custom Pattern (problem with ampersand &)

Last post 01-04-2007 12:13 AM by zaphi. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-03-2007 04:23 AM

    • zaphi
    • Top 150 Contributor
    • Joined on 01-09-2006
    • Switzerland
    • Posts 82

    Custom Pattern (problem with ampersand &)

    Hi,

    I'd like to validate data in a text box. I use the custom pattern in the data validation.

    I need to allow the character "ampersand (&)" in a text box, as
    e.g. [a-zA-Z0-9 @_\-&]*

    When I want to quit the Window "Data Entry Pattern", I have an error (pattern not valid)

    Thanks for your help.

    Best regards.
    Philippe



    Infopath 2007/SP2
  • 01-03-2007 10:04 PM In reply to

    • Aruna
    • Not Ranked
    • Joined on 12-13-2006
    • India
    • Posts 17

    Re: Custom Pattern (problem with ampersand &)

    Hi Zaphi,

    In the Data Entry Pattern window,
    Select "Any character" and then select "Zero or more"from the drop down Insert special
    character . So that it allows you to insert ampersand(&) symbol.

    I have a question for you,
    Without validation also we can enter special characters into a text box if it is of type Text(String). Do you want to insert only special characters "@_\-&"?
  • 01-04-2007 12:13 AM In reply to

    • zaphi
    • Top 150 Contributor
    • Joined on 01-09-2006
    • Switzerland
    • Posts 82

    Re: Custom Pattern (problem with ampersand &)

    Hi Aruna,
    Thank you for your answer.

    To reply to your question, I validate the text box because the content will be used in the file name. This field is a supplier name and the ampersand (&) is very common. I just want to avoid to check the whole filename before saving. All character such *+/\:|<>?" and "space" must be avoid at the data entering.

    With your proposal, every character can be entered. Have you got a another idea to solve my problem?

    Best regards.
    Philippe



    Infopath 2007/SP2
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.