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 2 of 2 (28 items) < Previous 1 2
Sort Posts: Previous Next
  • 01-21-2009 09:39 AM In reply to

    Re: referencing data from repeating sections

    Here is the latest and greatest.  I haven't had a chance to try what you suggested, just wanted to post my latest data source since it changed so much from the last one. 

    Murphy tha Dog
  • 01-21-2009 01:59 PM In reply to

    Re: referencing data from repeating sections

    Well that worked for the drop down.  I think I will need code for the summary though, because my thinking is the stacking will need the drop down and now that I know how that works it looks like it is perfect for the stacking.

    The Summary sheet I think will need coding for the autopopulating.  I can't seem to force it to look beyond the AdminSuite for autopopulating.  Where its automatic.  

    Murphy tha Dog
  • 01-30-2009 09:06 AM In reply to

    Re: referencing data from repeating sections

    I think I'm on the home stretch of my form.  I'm at the Stacking Options part of the Form.  Which is luckily the last part.  Basically the Stacking Options will be the whole TOC Summary rearranged per floor.  For instance you can either build the building all on one floor or stack it up higher.  The reason for stacking options is to give the customer the ability to choose what's best to fit on a property or future property.

     I'm sort of stuck on how to do a drop down list of multiple groups.  I can get it from one repeating group but not multiple repeating groups.  I will attach my latest form to see if anyone has any ideas.  

     

    Murphy tha Dog
  • 02-03-2009 08:18 AM In reply to

    Re: referencing data from repeating sections

    Hi--

    There isn't an out of the box way to get drop down values from more than one data source. One way around this is to use two (or more) drop down controls, and use conditional formatting to show the correct one. Another thing you can do, if you are using SQL (or Access, I believe) to store the data that is used for the drop down values, is create a view that combines the data sources. And, of course, you can always use code.... add an xml file as a secondary data source that has a repeating structure:

     <?xml version="1.0" encoding="utf-8"?>
    <Util>
          <row>
                <value></value>
                <display></display>
          </row>
    </Util>

    Use it for your drop downs and populate it in code with the values from your other data sources. Hey, I did download and take a look at your form -- you seem to have a lot of unbound controls you should probably address (the ones w/ the red x in the corners....)

    Hilary Stoupa

  • 02-17-2009 01:34 PM In reply to

    I re-worked my whole form once again.  I think it's good enough to submit, but some how I hosed up my auto-numbering and I can't seem to get it right on a couple of views.  The 01A_TOC View and the 02_Main Input for Services view.  These are the only 2 with autonumbering. 

     

    I went ahead and tried a couple of times without success.  The 02_main view is tricky because it needs to reset itself for every new "service" as I call it.  

    Murphy tha Dog
  • 02-17-2009 07:36 PM In reply to

    Re: referencing data from repeating sections

    Please change the default value of DepartmentSection/Services/AutoNumber to:

    count(../../../preceding-sibling::my:RepeatingServices//my:AutoNumber) + count(../../preceding-sibling::my:DepartmentSection//my:AutoNumber) + count(../preceding-sibling::my:Services//my:AutoNumber) + 1

    Change the default value of DepartmentSection/TotalNetArea/AutoNumber to:

    ../../my:Services[last()]/my:ServicesTable[last()]/my:AutoNumber + 1

    And change the default value of RepeatingServices/OptionalArea/AutoNumber to:

    ../../my:DepartmentSection[last()]/my:DeptGrossArea/my:AutoNumber + 1

    I'll be back to help with the other view later on, but tell me if there are any troubles with the above.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-17-2009 07:57 PM In reply to

    Re: referencing data from repeating sections

    I'm a bit confused about what you are trying to do on the TOC page.  You have a filter set to only display rows where SectionTitle is equal to "Administrative Services", but you are allowing users to insert rows and select the SectionTitle from a dropdown box.  This is a bit of a contradiction.

    The reason the numbers are skipping is that when the form loads, a row is being hidden because its SectionTitle is blank, and not equal to "Administrative Services".

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-18-2009 05:55 AM In reply to

    Re: referencing data from repeating sections

     I think that was a left over from something I was trying to accomplish that didn't work.  The TOC is a summary of all different types of rooms that can be filled out in the form. 

     

    Administrative Services:

    Administration
    Education Center
    Employee Services
    Information Services
    Lobby Services
    Medical Records
    Etc.

    Diagnostic & Treatment Services

    Emergency Department
    Diagnostic Department
    Laboratory/Specimen Collection
    Surgery Department
    Etc

    Inpatient Services

    Acute Care Unite A
    Acute Care Unit B
    Critical Care Unit
    Obstetrics
    Etc

     With the filter I was hoping to get only the data from each area but I could never get it to work.  So I decided since I'm going to be filling out the form and saving it as a template, then saving the form as source files then I would go ahead an set up the TOC manually, since I couldn't figure out how to do it automatically. 

    The autonumber for the first part seems to work.  Is there a way I can get it to reset for every new Section?  For instance When I Add a new area it keeps counting up.  


    Murphy tha Dog
  • 02-18-2009 09:04 AM In reply to

    Re: referencing data from repeating sections

    I removed that filter.  I had tried to use a filter to filter the data for Admin Services and Inpatient Services and didn't have any luck.

    Murphy tha Dog
  • 02-18-2009 12:33 PM In reply to

    Re: referencing data from repeating sections

    Got the second one working, I'm still working on the TOC autonumbering.  

    Murphy tha Dog
  • 02-19-2009 08:25 AM In reply to

     Updated XSN attached.  Why is my TOC autonumbering starting with 6?  I can't seem to get it to start with 1. 

    Murphy tha Dog
  • 02-19-2009 06:04 PM In reply to

    Re: referencing data from repeating sections

    It looks like you still have filters on both repeating sections in the TOC.

    Once the filters are removed, the default value of TOC/TOCgroup/AutoNumber should be:

    count(../preceding-sibling::my:TOCgroup/my:AutoNumber) + count(../preceding-sibling::my:TOCgroup/my:group2/my:field1) + 1

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-20-2009 08:03 AM In reply to

    Re: referencing data from repeating sections

    Yay I'm done.  Now I need to show them what I've done; see if they like it and turn it over to some real programmers (this means someone besides me the network administrator).  Thanks for everyone's help on this especially Jimmy. 

     

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