Data validation - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Data validation

Last post 06-22-2006 10:24 AM by Stephanie Cantwell. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 05-28-2006 11:11 PM

    Data validation

    Hello all,

    does someone out there know how i can set up a data validation which checks if the entered value is not longer than six characters (can be numbers or letters).
    Additional question: Can I change the message that pops up when the user tries to submit the form but hasn't filled all mandatory fields yet ?

    Thx
    Listen to Motörhead cos they play Rock'n Roll :)
  • 05-28-2006 11:16 PM In reply to

    Okay the first answer i just figured out myself but second one unfortunately not. So if someone can help me, would be nice.
    Listen to Motörhead cos they play Rock'n Roll :)
  • 05-28-2006 11:50 PM In reply to

    Hi,
    You can set your own message, when user tries to submit the form with validation errors,
    if(thisXDocument.Errors.Count >0)
    {
    thisXDocument.UI.Alert("Your message");
    }

    I hope this will help for you,

    Thanks
    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 06-21-2006 04:39 AM In reply to

    • nupur
    • Top 500 Contributor
    • Joined on 05-22-2006
    • Posts 26
    hi
    i tried using the logic u gave in by coverting it to a VB Code but it is not giving me the desired result......
    One more thing...i tried to use the submit options and fiving a customized message...that is not working......
    i fail to understand y!!!
    Any help wud be greatly appreciated!!!
    Thanks
    Nupur
  • 06-21-2006 02:50 PM In reply to

    Hi Nupur,

    Here is a piece of JScript sample code. Hopefully, this will help you.

    var objField =
    XDocument.DOM.selectSingleNode("//my:myFields/my:field1")
    if(objField.text == "")
    {
    XDocument.UI.Alert("field1 field must be filled in!");
    }
    else
    {
    var objSubmitAdapter = XDocument.DataAdapters("Main submit");
    objSubmitAdapter.Submit();
    }
    Stephanie Cantwell / Test Manager
    Qdabra® Software / Streamline data gathering to turn process into knowledge

  • 06-21-2006 11:58 PM In reply to

    • nupur
    • Top 500 Contributor
    • Joined on 05-22-2006
    • Posts 26
    Hi
    i converted the code to VB script and tried running it but it dosen't run... i guess in the code the on Submit request event is not really being executed... do i have to change some settinge or som properties to do that?
  • 06-22-2006 10:24 AM In reply to

    Hi,

    Have you set up your data connection and enable your Submit commands and buttons option in the Submitting Forms (under Tools)?

    Stephanie Cantwell / Test Manager
    Qdabra® Software / Streamline data gathering to turn process into knowledge

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