referencing data from repeating sections - InfoPath Dev
in

InfoPath Dev

referencing data from repeating sections

Last post 02-20-2009 08:03 AM by murphythadog. 27 replies.
Page 1 of 2 (28 items) 1 2 Next >
Sort Posts: Previous Next
  • 01-14-2009 06:59 AM

    referencing data from repeating sections

    I'm on to the next step of my form and I realized that now I need to take all the information that the user inputs in the repeating sections into a Summary Sheet.   I will post an example of my code and some images of what is going on.  I am able to get a pulldown to show the Sheet Names for each section, and it pulls in the data for the first section.  When I select the next sheetname in the pulldown it pulls in the data, but from the first section it never pulls in the data from the second section.  I'm thinking it's a formula issue. 


    Murphy tha Dog
  • 01-14-2009 07:00 AM In reply to

    Re: referencing data from repeating sections

     Here is the filled out forms from which the data is coming from.


    Murphy tha Dog
  • 01-14-2009 07:01 AM In reply to

    Re: referencing data from repeating sections

     Here is the second repeating section of the form.


    Murphy tha Dog
  • 01-14-2009 07:02 AM In reply to

    Re: referencing data from repeating sections

     Here is the example file. 

    Murphy tha Dog
  • 01-14-2009 08:57 AM In reply to

    Re: referencing data from repeating sections

     I am also trying to get the drop down list to remove the item once it is selected.  For instance, once I pick Acute Room A it does not appear on the drop down anymore. 

    Murphy tha Dog
  • 01-14-2009 02:35 PM In reply to

    Re: referencing data from repeating sections

    Hi, I'm confused. When you say

    murphythadog:
    from the first section it never pulls in the data from the second section.
    What is the first section and what is the second? Looking at screenshot with your first post, I can't quite understand exactly what you want to do.

    There's a sample form at this post that uses the double eval trick to filter out previously selected values... that may work for you.

    Hilary Stoupa

  • 01-15-2009 06:11 AM In reply to

    Re: referencing data from repeating sections

    I can get the pulldown list to show Acute Care A and Acute Care B, on the Summary Page, there is a rule that I setup to automatically fill in the Total on the Summary page from the other forms, when I choose Acute Care A "611" is the correct total that is automatically filled in on the Summary page, when I select the Acute Care B I get 611 automatically filled in as well instead of what it really should be.   It's like the auto fill rule looks back at the sections and just pulls from the first one it sees instead of the next one.  I'm assuming there might be a formula like Next Total of some sort I must put in but I can't seem to find out how to do that. 

    Murphy tha Dog
  • 01-15-2009 08:59 AM In reply to

    Re: referencing data from repeating sections

    I rearranged my data source and my fields into how it might need to be structured.  Is it possible to autopopulate a repeating table with data using a function?  For instanct here is my layout:

     TOC_Summary [group]

    Services [group] repeating
    Sheet [Field]
    Total [Field]

    Admin Services [Group]

    AdminSuite [Group]

     Header [Group]
    Sheet [Field]

    Education [Group]

     Header [Group]
    Sheet [Field]

     What I want to do is and I'm not sure how to type this in for infopath coding but how it would work in my head:

    For the TOC_Summary Sheet field there would be a formula that says Look in AdminServices/AdminSuite/Header/ and get Sheet then get next AdminServices/Education/Header/ and get Sheet for the next row. 

     I'm going to go buy an InfoPath book at lunch i just can't seem to figure out how to make infopath work for me and not against me :)

    Sorry to be so confusing, I'm not a programmer but I play one on TV.  

     

     

    Murphy tha Dog
  • 01-15-2009 10:09 AM In reply to

    Re: referencing data from repeating sections

    Okay, so just to clarify, when you select Acute Care A, you want a total of all the items that are Acute Care A... and for Acute Care B, all the B items....I'm attaching a sample form for this. Please right click the link in the header, select 'Save Target As' and open in design mode. Preview to test.

    Hilary Stoupa

  • 01-15-2009 02:38 PM In reply to

    Re: referencing data from repeating sections

    I'm not having much success with this, I will try again tomorrow.  I bought a book Pro Infopath 2007 by Apress.  It seems to be very generic.  I can't figure out how to Summarize my data on the main summary sheet.  I just want it to give me the sheet name then input the totals for that sheet, maybe I should try it with rules or something, i'm not sure. 

    Murphy tha Dog
  • 01-16-2009 07:50 AM In reply to

    Re: referencing data from repeating sections

    Let me see is this picture helps.  I have my data source rearranged so that AdministrativeSrervices has all the sub titles under it.  AdminSuite, Education, Employee Services

    AdministrativeServices

    AdminSuite
    Education
    EmployeeServices
    InfoServicess
    LobbyServices
    MedicalRecords

    Under the Summary Page, I need a repeating table to look up in each group under AdministrativeServices and pull the Sheet and Total from each group.  So I'm thinking about using preceding-sibling in this formula so that it looks in AdminSuite pulls the Sheet and Total, then it looks in EmployeeServices pulls the sheet and total.  Thus giving me a summary for each area. 

     Right now I can just go ahead and put a static table, but it seems to slow down my  form when doing the calculations.  That's why I'm trying to get it to automatically fill in using a repeating table since these seem to stream line the form. 


    Murphy tha Dog
  • 01-19-2009 05:14 PM In reply to

    Re: referencing data from repeating sections

    I can't think of a way to do what you want w/out writing some code -- for example, taking the information you want summarized, and populating another repeating group with the info, then binding a repeating table to it.

    Hilary Stoupa

  • 01-20-2009 05:52 AM In reply to

    Re: referencing data from repeating sections

    I agree, so where do I go to find the code that I need to put into my form?  Is there another forum that talks about code?  Can you suggest a book?  Any help would be appreciated.  Thanks

    Murphy tha Dog
  • 01-20-2009 06:56 AM In reply to

    Re: referencing data from repeating sections

    I think there might be a way to get those numbers right without using code.  I am experimenting on the form you attached in the 4th post of this thread.

     Open up the Dropdown box's properties, click the button next to Entries: and select the AcuteCare node.
     For Value, click the button and select AcuteCare/DptDGA/Total
     For Display, select AcuteCare/Header/Sheet

    Then delete the field9 textbox from the table, and replace it with an expression box bound to field7.

    This should get you the behavior you described in your initial post, but not the dropdown box behavior or autopopulating you described later.  Anyway, give the above a try and let us know if it will be sufficient or if we should start digging into code.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-20-2009 07:34 AM In reply to

    Re: referencing data from repeating sections

    I should have updated my XSN earlier, because I rearranged my data source a little to try an accomplish my task here.  It didn't seem to help.  I would post it, but I'm actually a jobsite in NJ setting up routers, switches and a couple of users.  I don't have access to the server my xsn file is on, so I will try and upload it tomorrow when I get back.  I will also try the method you described.  I think I'm leaning towards auto-populated textboxes for the Summary page and I will probably want to do Drop Down boxes for the Stacking Options page which isn't even built yet. 

    Murphy tha Dog
Page 1 of 2 (28 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.