Infopath 2007 repeating table, select N column - InfoPath Dev
in

InfoPath Dev

Infopath 2007 repeating table, select N column

Last post 07-12-2012 07:59 AM by dustbin111. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-12-2012 06:27 AM

    Infopath 2007 repeating table, select N column

    I am working on an InfoPath 2007 form with a repeating table pulled from SQL.  What I need to do is send an e-mail for each line that comes back from the query.  I copied the repeating table lower in the form into a repeating section (where I will put my e-mail information), but I am clueless how to filter the repeating table/section to select the Nth record in the repeating table only (based on the position).  I was able to do something similar in another form where I had the user input the number of items they need, and based on position() being less than that number, it created additional repeating sections.

    Here is what is working in the other form, I assume if I can figure out how to count the records in the repeating table, this will be simple:

    Conditional formating on repeating section:  If position() > /my:myFields/my:field65, hide this section. Field65 is an integer typed in by the user.

  • 07-12-2012 07:33 AM In reply to

    Re: Infopath 2007 repeating table, select N column

    I found the equivalent of auto-assigning unique IDs was to add a field (i.e. "fieldLineItem") to the repeating table with the Default Value of:

    count(../preceding-sibling::*) + 1

    You could then run conditional formatting on the section that says if fieldLineItem > /my:myFields/my:field65 hide this control.

     ~Dustin.

  • 07-12-2012 07:44 AM In reply to

    Re: Infopath 2007 repeating table, select N column

    Dustin,

    I think you are suggesting that I add a field to the repeating table?  The only issue is, this form is a database template, so the fields are locked, I can't add fields to the repeating table.  If I try to insert a field outside of the repeating table, it doesn't repeat :(

  • 07-12-2012 07:59 AM In reply to

    Re: Infopath 2007 repeating table, select N column

    Gotcha.

     As a test, I created a new form using the database template under Advance Form Templates (InfoPath 2010)

    You are correct, I could not add any fields outside of those brought in by the data connection (kinda useless).

    I would start with a blank filler form template, create the repeating table, bind the fields to a data connection that recieves from your SQL server.  This should give you free reign over data manipulation

    ~Dustin.

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