Restricted repeating sections - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Restricted repeating sections

Last post 09-20-2005 11:47 PM by Patrick Halstead. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-20-2005 05:43 PM

    • david
    • Not Ranked
    • Joined on 08-17-2005
    • Posts 4

    Restricted repeating sections

    Is there a way to restrict the number of repeating sections a user can add to a form?

    David
  • 09-20-2005 07:23 PM In reply to

    Re: Restricted repeating sections

    Try messing around with the OnBeforeChange event for the repeating group (go to data source >> double click on the group >> go to validation and event handlers tab >> select the OnBeforeChange event and press edit). In the event handler, check the count and if it is too large set eventObj.ReturnStatus = false.

    If eventObj.IsUndoRedo = false AND eventObj.Operation = "Insert" AND CHECK COUNT HERE Then
    'too many items
    eventObj.ReturnStatus = false.
    End If

    Hope that works...that is what I would try...
    Jason
    http://www.k2distillery.com/
  • 09-20-2005 11:47 PM In reply to

    Re: Restricted repeating sections

    You can also set the MaxOccurs attribute in the schema but that requires hand-editing.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.