Loop through repeating table - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Loop through repeating table

Last post 10-21-2008 02:47 PM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-15-2008 09:45 PM

    Loop through repeating table

    I have what I think should be a rather simple problem, but to a complete n00b like me, it's daunting at best.

     The basic scenario is this:

    I have a database set up for new employees of our company.  Upon hire, our HR department will fill out a form (only the top portion) with employee information (Name, User Name, Email Address, Position, etc.).  When they are finished, they will click a submit button.  I'd like this button to do two things:

    1.) Fill a repeating table of applications that the employee needs access to

    2.) Email the list of people responsible for the queried applications.

    When the email is received by the "responsible parties", I'd like them to check a box that that application access has been granted, what the default password was set to, and then click a submit button so that the data is both written back to the database (for reporting) as well as emailed back to HR.

     The buttons are my problem.  I can get the repeating table to work correctly, and employee information and application information is added to the database as expected, but the problem is the actions of the buttons.  Having worked so little with infopath, I'm new to VSTA and programming the button to perform the actions. 

    I'd like it to build the repeating table below of necessary applications, and then submit an email to all of the individuals listed as responsible for those applications, and all of this is based on queries from the database, which defines the applications, and the responsible parties.

     I will be happy to post more details as necessary, but would like to get a discussion on this started.  I've read forum after forum, and it seems that either I'm using the wrong search terms or this hasn't ever been done (more than difficult to believe).

     I'm not concerned with any particular language, just so long as it works, and I have little experience with any of them. 

    ***Is guessing this is more than I knew I was getting into when I took on the project...:)  ***

    Chris Gray
    IT Technician (& more) :)
  • 10-21-2008 01:33 PM In reply to

    Re: Loop through repeating table

    Hi, and welcome!

    So the first thing your button will need to do is fill a table that is bound to your main data source with information from a secondary data source, right?

    And the second thing it needs to do is generate a "To" list, based on the emails associated with each application... do I have the gist of it?

    Filling the table will require code, but I think the email "To" list can be done with rules. You are using IP 2007, correct? (I'm guessing that since you said VSTA....)

    Hilary Stoupa

  • 10-21-2008 01:56 PM In reply to

    Re: Loop through repeating table

    That's exactly what I am going for.  The solution I came up with to solve the problem and yet not write code is to have a hidden field in the main data connection that is filled by rules based on the secondary data connection, and use a nested eval command to loop through the email field to compose the email.  This has worked well, but it does not filter for duplicate entries.  I thought this would be a problem, but upon further testing, I found that Outlook filters duplicates on it's own, so even if the email address apears multiple times, each recipient only receives the message once.  It's a little messy, and I'm sure there's a cleaner way to do it, but being the n00b that I am, coding is frightening at best.

    Chris Gray
    IT Technician (& more) :)
  • 10-21-2008 02:47 PM In reply to

    Re: Loop through repeating table

    Fantastic -- glad you got things working, and with rules instead of code!

    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.