proper stuck with data validation upon submit - InfoPath Dev
in

InfoPath Dev

proper stuck with data validation upon submit

Last post 10-05-2010 11:37 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-01-2010 08:57 AM

    proper stuck with data validation upon submit

    Hi,

     I have designed a set of forms for a booking system for a test room. It is working fine but to add the next functionality I am stuck........

     little example is - I have a table that displays the Test Server name, Booking Date, Timeslot, and the Requestor.

     Test Server 1 ----------> Joe Bloggs ----------> 30/10/2010 ----------> 9:00AM to 10:00AM

     It pulls this information from the database after the user has submitted the form.

     PROBLEM: I cannot stop a user from booking the same TEST SERVER, DATE, and TIMESLOT the form except the new booking and then this view displays both results.

    Is there a way I can query if this set of records exist then block the user from submitting with a nice error message.

    Any help would be very helpful.

    Regards

    Rich

     

  • 10-05-2010 11:37 PM In reply to

    Re: proper stuck with data validation upon submit

    Hi Rich,

    Just add rules to both the Booking Date and Timeslot fields that query the database when a value is entered (if the Timeslot and Booking Date are also present, respectively - that's a condition). Add a secondary data connection for this (don't use the main data source if you have a database backed form). Then, the query datasource action will populate a secondary data source. You can then compare the value to the secondary data source and if you find a match, you can pop up a nice warning message. Key thing here is to filter the query going to the database. InfoPath doesn't provide parameterized filtering via the out-of-box receive data connector, but you can use a Web service to query. If you don't it will return all of the data in the table which could result in a delay. Take a look at Qdabra's free trial Web service (DBXL) which includes parameterized query, You should be able to use the QueryBuilder to construct a query based on your fields in less than 30 minutes. Lots of documents and even videos on this technique.

     

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.