No More/No Less Limitation - InfoPath Dev
in

InfoPath Dev

No More/No Less Limitation

Last post 12-20-2006 02:16 AM by Shiva. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-13-2006 03:56 AM

    • Aximand
    • Not Ranked
    • Joined on 10-30-2006
    • United Kingdom
    • Posts 4

    No More/No Less Limitation

    I'm trying to get a limit set on a 'cannot be blank' textbox so that it can not have more than so many characters in...

    That was the easy bit...

    I'm struggling to find out if there is a 'No Less' limitation since we have rolled out this new system and users are inputting the data with some characters missing...

    Can anyone shed some light?

    Thanks in advance.

    Adam.
  • 12-13-2006 05:10 AM In reply to

    Re: No More/No Less Limitation

    Hi Adam,
    You can apply data validation on that field that it should not be less than and greater than the required character length.

    Hope it helps you!
    Shilpa
    INFOPATHDEV India
  • 12-20-2006 02:16 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: No More/No Less Limitation

    Hi Adam,

    We can do this by putting validation on this field using does not match pattern. For example if the we show the validation is more than 4 character and less than 2 characters by using the below validation.

    1. Select field from first dropdown and select does not match pattern from second dropdown.
    2. Select Select a pattern… from third drop down and choose Custom Pattern
    3. Select Any letter option 4 times from ‘Insert special character#%92 dropdown
    4. Add two more validation same type with selection of Any letter option is 3 times and 2 times.

    By doing this field give the validation if you enter more than 4 characters and less than 2 character.

    We can write below code for onAfterChange event for display the validation message

    Var strLength = eventObj.Site.text.length;
    If(strLength < 2 || strLength > 4)
    {
    thisXDocument.UI.Alert("String length is Invalid");
    return;
    }
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.