Data Validation Not working In Browser Form - InfoPath Dev
in

InfoPath Dev

Data Validation Not working In Browser Form

Last post 04-02-2009 05:23 AM by Lotti. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 12-31-2008 02:41 PM

    Data Validation Not working In Browser Form

    I have a per diem expense reimbursement form that has a text box for hours which is used in a calculation with a rate field to determine how much is owed to the individual.  I'm trying to restrict the text box to accept hours in quarter hour increments (i.e. 2.25, 2.5, 2.75, 3).  I am able to restrict it by using the following custom pattern:

    \d*\.0|\d*\.00|\d*\.25|\d*\.5|\d*\.50|\d*\.75

     However when you enter a whole number such as 2, 3, etc. it throws a validation error.  When you enter "2.0" its fine.  Also if you enter 2 it will append 2.00 (due to format being set to 2 decimals) to it but still gets a validation error.  I have tried setting the decimal value to auto but still have the same problem.  I also tried to add \d* without a decimal but that opens it up to any and all digits/decimal combinations.  Any help with telling me how I can achieve this would be greatly appreciated!  I'm about to pull my hair out!

  • 01-01-2009 09:06 PM In reply to

    Re: Data Validation Not working In Browser Form

    Hi,

    I have tried this by setting the format to auto and its working fine for me. Once try by setting the post back settings to Always in the Browser forms tab of text box properties.

    Swathip
    www.ggktech.com
  • 01-12-2009 09:32 AM In reply to

    Re: Data Validation Not working In Browser Form

    I have it set to auto as well as having the post back to always.  However it will not allow a user to enter a whole number.  If you just enter "2" or any other number it is requiring that you enter "2.0" or "2.00".  If anyone knows how to require quarter hour increments while still allowing a whole number to pass through, please let me know what the custom pattern is to allow this functionality.

  • 01-14-2009 09:28 PM In reply to

    Re: Data Validation Not working In Browser Form

    Hi,

    Sorry for the late. Try the following expression.

    \d*\.0|\d*\.00|\d*\.25|\d*\.5|\d*\.50|\d*\.75|\d*

    Hope it will solve your problem.

    Swathip
    www.ggktech.com
  • 01-16-2009 09:47 AM In reply to

    Re: Data Validation Not working In Browser Form

    Okay, that does work.  When previewing in the browser it works well and if I enter an invalid sequence of numbers it throws the red box around the control.  However, once I publish this as a web form to MOSS it no longer places the red box around the error.  Is the by design in a browser enabled form or is something else going on?  It would be nice to have the red box since that is very easy to recognize as an input error for a user with basic computer skills or one without working knowledge of how the form was designed.

  • 01-16-2009 11:00 PM In reply to

    Re: Data Validation Not working In Browser Form

    Hi,

    Use he following expression to validate the text box to fulfill your requirement.

    not(xdUtil:Match(string(.), "\d*")) and not(xdUtil:Match(string(.), "\d*\.25")) and not(xdUtil:Match(string(.), "\d*\.0")) and not(xdUtil:Match(string(.), "\d*\.00")) and not(xdUtil:Match(string(.), "\d*\.5")) and not(xdUtil:Match(string(.), "\d*\.75"))

    Swathip
    www.ggktech.com
  • 04-02-2009 05:23 AM In reply to

    • Lotti
    • Not Ranked
    • Joined on 04-02-2009
    • Posts 2

    Re: Powerful Declarative Logic: Phone Number Parsing

    Please help in infopath  

     

    The Following expression is not valid

    Expected value type

    string-length(translate(translate(., "()- 0123456789", "")) = 0

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