Iterating through a repeating table, sub-controls - InfoPath Dev
in

InfoPath Dev

Iterating through a repeating table, sub-controls

Last post 01-11-2007 09:03 AM by ndesai. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-09-2007 12:42 PM

    • ndesai
    • Not Ranked
    • Joined on 01-09-2007
    • Posts 3

    Iterating through a repeating table, sub-controls

    Good afternoon,

    I ran in to this site today and was extremely pleased with the how-tos, resources, and content on InfoPath. I did some searching on the item below, but didn't find anything I could utilize.

    I have a repeating table on my form that pulls data from an MS Access database (secondary datasource- ACLd on a network share so that it is readonly). The table contains a column that has a radio button group. This group allows the user to mark the data as 'dirty'. When the user is finished updating, he/she will click a button to submit the changes.

    Thank you!

    When the button is clicked, I would like to be able to iterate through the data in the repeating table and identify those rows where the radio button control has been set to "true" (as an example). This will then allow me to make updates to the database accordingly.

    A few points:
    1. I'm not sure if InfoPath inherently supports control iteration to obtain values.
    2. If we cannot access controls on the form programatically, would it be possible to extract the data in the repeating table (with the changes made by the user) in to an XML document so that I can manipulate via code?
    3. I've not allowed users to make updates to the database directly as I would like to have a point of control before updates are made. Plus, we don't have the funds at the moment to upgrade to SQL Server where we could utilize permission groups to enforce security =)

    If anyone has any thoughts to the feasibility of this, please let me know. If this is not possible, is there a way to populate a repeating table bound to the Main data source with data from the secondary data source?
  • 01-10-2007 01:22 AM In reply to

    Re: Iterating through a repeating table, sub-controls

    Hi Ndesai and welcome to our forum!
    Easiest way to do this is to write some code that iterates through the nodes and update the database for those rows that have the value set to true. This is pretty easy to do and should take maybe 10-20 lines of code. Good luck!
    Patrick Halstead
    Project Manager at Qdabra
  • 01-10-2007 09:16 AM In reply to

    • ndesai
    • Not Ranked
    • Joined on 01-09-2007
    • Posts 3

    Re: Iterating through a repeating table, sub-controls

    Thank you for the reply Patrick.
    A follow up: Just to be sure I was clear...once the repeating table is populated on the form via the secondary data source (e.g. the table is bound to the 2nd data source), the user will then make changes to the data (textbox, radiobutton, etc).

    Would I access this data via the secondary DOM or is there a specific way to get at the data within the repeating table? It seems that if I use the 2nd data source, I would just be obtaining data from the database and not from the repeating table where changes were made.

    Thank you!
    -Nishant
  • 01-11-2007 09:03 AM In reply to

    • ndesai
    • Not Ranked
    • Joined on 01-09-2007
    • Posts 3

    Re: Iterating through a repeating table, sub-controls

    Patrick...answered my own question. It is the case that I can iterate through the secondary connection DOM and obtain the changes made by the user. I finished up the 'review' table that takes those changes and submits them to Sharepoint for processing. Thanks again for your assistance.
    Regards,
    Nishant
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.