adding rows to repeating table with cascading drop-downs programmatically - InfoPath Dev
in

InfoPath Dev

adding rows to repeating table with cascading drop-downs programmatically

Last post 03-16-2010 11:52 PM by Qazi Anis. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-16-2010 12:36 PM

    adding rows to repeating table with cascading drop-downs programmatically

    I have an InfoPath form with an XML datasource which lists all hospitals in the country. On the main tab there is a drop-down for the region you are in. My XML datasource is formatted like this:

     <HOSPITAL Region="Region Name" Zone="#" name="Hospital Name"/>

     Once a user chooses the region, there is a tab for Hospital Access on which they can choose the Zone# and then pick facilities. There is a repeating table with column 1 housing the Zones as a drop-down list and column 2 housing the facilities as a multiple selection list box.

     My users don't want to to "Click Here to Insert Another Row" when they need to pick another Zone in the repeating table. Right now, they click here and they can choose another Zone # and the list box populates with all hospitals in that zone.

    Is there anyway to populate those rows with the Zones from each region automatically when a region is chosen? I still want them to be able to change the Region selected and have the Zones refresh, but I need a way to add those rows programmatically for them. Each Region has a different number of zones, btw. 

    I saw this link from another post: http://www.infopathdev.com/blogs/jimmy/archive/2009/03/06/automatically-adding-rows-to-repeating-sections.aspx 

    However, I wasn't able to get it working in my form. I am using VB and tried using this line, but I'm not sure if this is the wrong track... Any help is greatly appreciated.

    Here's the code I'm using now:

    Public Sub repeatinGroup_142()

    CurrentView.ExecuteAction(ActionType.XCollectionInsert, "repeatingGroup_142")

    End Sub

  • 03-16-2010 11:52 PM In reply to

    Re: adding rows to repeating table with cascading drop-downs programmatically

    the code should work perfectly i guess your form falls under the scenarios for which this code doesnt work as mentioned by jimmy in the blog. if it doesnt please attach a skelton of your template (with code) so that we can have a look at it

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.