Validation rule which enforces highest number in a field - InfoPath Dev
in

InfoPath Dev

Validation rule which enforces highest number in a field

Last post 07-01-2011 11:09 AM by Mc2102. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-01-2011 08:52 AM

    • Mc2102
    • Not Ranked
    • Joined on 07-01-2011
    • Posts 4

    Validation rule which enforces highest number in a field

    Hello,

    I am trying to build a validation rule for a InfoPath 2010 form which simply does not allow any number higher then 255 in a text field.

    This is what I have and what does not work:

    Run the rule when this condition is true:
    Field1 - contains - max(Field1) > 255

    But it does not work. The rule never applies and does not prevent the use from typing in a number higher then 255.

    How can I make this happen?

    Thank you Mc2102

  • 07-01-2011 09:01 AM In reply to

    Re: Validation rule which enforces highest number in a field

    Is there other text in the field? Or are you just checking for 255? Is the field repeating (I ask cause you are using Max).

    I did a quick test - just used field1 > 255 for the condition, and when the field had a number greater than 255, the validation worked as anticipated (which is why I think I may not be quite understanding your scenario).

    Hilary Stoupa

  • 07-01-2011 09:19 AM In reply to

    Re: Validation rule which enforces highest number in a field

    Are you saying that you selected "contains" in the middle dropdown box?  If so, you should be selecting "is greater than" and then just entering 255 in the third box.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-01-2011 11:07 AM In reply to

    • Mc2102
    • Not Ranked
    • Joined on 07-01-2011
    • Posts 4

    Re: Validation rule which enforces highest number in a field

    @Hilary

    Yes there is additional text in the field. Actually the field contain a subnet address. So the string would look like this: 192.168.10.0\24.

    I want to make sure that none of the numbers between the dots is higher then 255.

     I was using MAX because I do not really know exactly how to challenge this and this function sounded like it could work.

  • 07-01-2011 11:09 AM In reply to

    • Mc2102
    • Not Ranked
    • Joined on 07-01-2011
    • Posts 4

    Re: Validation rule which enforces highest number in a field

    @Jimmy

     I will give that a try but I am not sure if that will work since I have some additional data in the field.

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.