Validation Rule on Repeating Table - InfoPath 2013 - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Validation Rule on Repeating Table - InfoPath 2013

Last post 09-17-2021 04:30 PM by kelsnz. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-16-2021 08:19 PM

    • kelsnz
    • Not Ranked
    • Joined on 12-09-2014
    • Posts 5

    Validation Rule on Repeating Table - InfoPath 2013

    Hi there, I am struggling with creating a Validation Rule on a Repeating Table that is referencing a Secondary Data Connection. I am creating a Hot Desk Booking System and require that a Secondary List (where the individual repeating table rows are submitted to) is checked when a new row item is added. Details are:- Workstation Form Library (where initial request is made) columns:- * Employee Name (Text) * Workstation (Choice) (in Repeating Table) * Date (Date) (In Repeating Table) * WS_Date (Calculated column of Workstation and Date column above and refreshes when changed) (In Repeating Table) Workstation List (where submitted items are saved) * Employee (Text) * Workstation (Text) * Date (Date) * WS+Date (Calculated column of Workstation and Date column above) I've put a Validation Rule on the WS_Date field in the Repeating Table in the Form Library that checks:- IF "Any Occurrence of WS+Date" (from List) = "WS_Date" (from Form) then Red Validation Error - works perfectly BUT, I also want to check that if a person edits their form, that they don't get the validation error above - which they will because these lines will already have been submitted. I've spent Weeks on and off trying to work this out but I think I've gotten to the stage where my brain is now just muddled...I've tried many combinations of Rules and other calculated columns and just can't get it to to work. I would be grateful of any advice! Happy to attach any screenshots or the form itself.
  • 09-17-2021 11:48 AM In reply to

    Re: Validation Rule on Repeating Table - InfoPath 2013

    Why not add a "status" field to your form? It doesn't have to show on the form, just be in the main data source. It can default to New. Then, the first time a user submits a form, in the submit rules, set it to Submitted (or whatever, just change it). Then your validation rules can be exactly what they are with the addition of "FormStatus is equal to New".
    Hilary Stoupa

  • 09-17-2021 03:32 PM In reply to

    • kelsnz
    • Not Ranked
    • Joined on 12-09-2014
    • Posts 5

    Re: Validation Rule on Repeating Table - InfoPath 2013

    Thanks for the quick response Hilary! You know what, I have done it like this many times before. It did just escape me this time for some reason... I do also need to check though that any additional items added to the table have not been taken by another Employee when the form is being edited. So along with checking the FormStatus + WS+Date - I also need to add Validation to check the List that if another item is added to the repeating table, that it is not taken by another Employee.
  • 09-17-2021 03:53 PM In reply to

    Re: Validation Rule on Repeating Table - InfoPath 2013

    Oh, got it. So you should probably just add the status field to the repeating table itself. Default to New, use that in your formatting rule. Then, on submit, if you set the repeating field to submitted, all instances will get set. Does that work for you?
    Hilary Stoupa

  • 09-17-2021 04:30 PM In reply to

    • kelsnz
    • Not Ranked
    • Joined on 12-09-2014
    • Posts 5

    Re: Validation Rule on Repeating Table - InfoPath 2013

    That's why you're the best Hilary ;-) Worked perfectly. Thanks very much for your help. Always seems obvious in hindsight!
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.