Repeating table and non repeating Section - InfoPath Dev
in

InfoPath Dev

Repeating table and non repeating Section

Last post 06-15-2009 09:24 AM by rhyatt. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-12-2009 01:41 PM

    • rhyatt
    • Not Ranked
    • Joined on 06-12-2009
    • Posts 9

    Repeating table and non repeating Section

    OK I will do my best to explain the problem I am having. I am trying to create an Infopath form that we can fill out for offsite tapes. I created a database with child tables as follows

    DB Backup
          Tables
              DBO.BACKUP
              DBO.TAPES

    The backup table has the following:
    BackupDate (Prim KEY)
    SealDate
    SecuritySeal
    SealEMP1 (Prim Key)
    SealEmp2 (Prim Key)
    Notes
    UnsealEMP1 (Prim Key)
    UnsealEMP2 (Prim Key)

    Tapes table has the following:
    BackupDate (Prim Key)
    BackupSet
    BarcodeLabel
    SealEMP1 (Prim Key)
    SealEmp2 (Prim Key)
    UnsealEMP1 (Prim Key)
    UnsealEMP2 (Prim Key)

    I have the BACKUP table set as a Section and the TAPES table set as a Repeating Table. I have the table repeating like 11 times on the form which is the current number of offsite tapes we have. What they would like to have done on the form is this. The Backupset field to be pre populated with the backup set name for each tape. So if the first set of tapes was for a file server backup they would want the backup set to already have "FS backup Tape 1", FS Backup Tape 2", etc already there. The BackupDate, Seal EMP1, SealEMP2, UnsealEMP1, UnsealEMP2, on the repeating table to contain the same information as what is listed in the Backup table Section of the form.

    The problem is that I don't know how to get the backupset names to prepopulate into the repeating section and when you will out the backupdate, sealemp1, etc part of the form it only copies to the first part of the repeating table. I had sugested doing a drop down list for the Backup set but the concern is that there is a chance to select the wrong set name for a tape. any Ideas you can think of would be great. If you need further information I can try to explain further.

  • 06-12-2009 03:32 PM In reply to

    Re: Repeating table and non repeating Section

    I've attached a sample that uses preceding-sibling to do what you want, I believe. Right click the link in the header of this post, and select save as to save the form locally. Then right click your local copy and select design to open in design mode. Preview to see the auto populated info, and add additional rows to see more. Hope that helps!

    Hilary Stoupa

  • 06-15-2009 07:32 AM In reply to

    • rhyatt
    • Not Ranked
    • Joined on 06-12-2009
    • Posts 9

    Re: Repeating table and non repeating Section

    That is real cool thanks. Now my question is when I am putting in the code I'm getting an error stating:

     "../preceding-sibling::my:backup/my:tapes/backupset" does not point to a valid location path of a field or group.

    Here is the code I am using.

    concat("FS Backup Tape ", count(../preceding-sibling::my:Tapes/my:backupset) + 1)

    I've changed my DB to look like this.
    Backup
         BackupDate
         SealDate
         SecuritySeal
         SealEMP1
         SealEMP2
         Notes
         UnsealEMP1
         UnsealEMP2
         Tapes
              BackupSet
              BarcodeLabel

    Also the reason I am doing a single field for the barcode label is so I can search the DB for a barcode of a tape and it will find the tape reguardless of what backupset it is from. We currently have 4 different backup sets that run everyday. So my other question for you would be could I create multiple repeating sections in my form and set each repeating section up for a different backup set using the formula you sent, but still only use the 2 fields in my DB for Backupset and BarcodeLabel to list the tapes.

    Thanks again for your reply.

  • 06-15-2009 09:24 AM In reply to

    • rhyatt
    • Not Ranked
    • Joined on 06-12-2009
    • Posts 9

    Re: Repeating table and non repeating Section

    I figured out one issue. the datatype for the textbox field that is bound to BACKUPSET in the DB is currently set to SimpleText. But it's greyed out and I can't change it to match what you have in your example.

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