disallow deleting all fields in repeating sections? - InfoPath Dev
in

InfoPath Dev

disallow deleting all fields in repeating sections?

Last post 05-30-2007 03:19 AM by Matt Faus. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-29-2007 03:48 AM

    • dreadz
    • Not Ranked
    • Joined on 05-18-2007
    • Posts 4

    disallow deleting all fields in repeating sections?

    in my form i have an repeating section that cannot be left blank, ie. the repeating section should contain at least one entry.

    it doesnt let you submit the form with a blank field in the section, but you can remove all fields in the repeating section and still submit the form.

    is there any way to stop this happening? thanks 

  • 05-29-2007 12:57 PM In reply to

    Re: disallow deleting all fields in repeating sections?

    Hi dreadz,

    What do you mean that you can remove all of the fields in the repeating section?  Do you mean that you can remove all instances of the repeating section so that there are no rows in the "table" ?

    To prevent this, you can add custom data validation on the repeating section that fires when number of rows = 0.  To do this, double-click the repeating section, go to the data validation and rules, and add a data validation that specifies this.  Don't forget to add a nice message!

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 05-30-2007 01:00 AM In reply to

    • dreadz
    • Not Ranked
    • Joined on 05-18-2007
    • Posts 4

    Re: disallow deleting all fields in repeating sections?

    Thanks for your reply. I don't see anything to do with the number of rows under the validation or rules tabs though?
  • 05-30-2007 03:19 AM In reply to

    Re: disallow deleting all fields in repeating sections?

    Look around a little bit for the count() function.  You can use this to see how many instances of a repeating group are present in the XML.  If it is equal to zero, then you will need to fire your data validation.

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.