Validate value comparing dates from same table - InfoPath Dev
in

InfoPath Dev

Validate value comparing dates from same table

Last post 01-28-2015 11:37 AM by Bre Huston. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-27-2015 09:57 AM

    Validate value comparing dates from same table

    I have a SharePoint Custom List, that manages classrooms and the time when they are used (pretty much it schedules classes) and I need to validate that the classroom is not used on the time that is submitted.

    The form has the following fields:

    -Start, End (date and time type of data)

    -Classroom (Drop down list)

    So, I need a rule on the classroom or submit button that displays "Classroom is scheduled for that time, please select another one) if the classroom is in use on that Schedule.

    The thing is that I need to see first if in the scheduled time there is another class and then if there is a class, see if the classroom is used.  

  • 01-28-2015 11:37 AM In reply to

    Re: Validate value comparing dates from same table

    Hello Nicolas.delcampom,

    For this I would use a custom submit connection. By disabling the ribbon, you can add a button with custom events to your form. You'll need 2 new data connections:

    1. Submit connection to your Library (where the form submits)
    2. Receive data connection to the library (note, classroom, date, start time and end time need to be promoted as columns)

    On the button add a rule to set the query field of classroom to the selection in the form, as well as the date. This should limit the entries to any entered. Then you'll need to either display that data or have a calculated value that only shows if the returned information of time conflicts with the users selection. If there are no rows returned, or the time does not conflict the submit action will follow.

    Hope that helps!
    Bre 

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