Coding a fixed table to have a repeating table behavior output - InfoPath Dev
in

InfoPath Dev

Coding a fixed table to have a repeating table behavior output

Last post 12-28-2010 09:22 AM by Jimmy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-28-2010 08:11 AM

    Coding a fixed table to have a repeating table behavior output

    I have this paper form I am transforming into infopath:

    As you can see, this is not really a repeating table, in the sense that no new rows are required to be added, because the first column contains a list of 27 possible genetic test a patient may take, although the date and the result can and should be modeled as repeating, since they are the same type of data for all the available tests. The patient then have to write in the date and the result on the corresponding cell. If I try to import this directly, Infopath creates a field for every single cell, which is a less than ideal solution because then I have a massive set of individual variables for each date and result. Ideally, the resulting xml would be something like this:
    <Performed_Tests>
      <TestRow>
      <GeneticTest>
       HNPP point mutation (Peripheral Myelin Protein-22 gene)
      </GeneticTest>
      <YearTested>
       2002
      </YearTested>
      <Result>
       Negative
      </Result>
     </TestRow>
     <TestRow>
      <GeneticTest>
       CMT1C point mutation (LITAF)
      </GeneticTest>
      <YearTested>
       1999
      </YearTested>
      <Result>
       Negative
      </Result>
     </TestRow>
    ...
    </Performed_Test>
    This is, every row in the paper form table should map to a row into the xml stored structured data; that is the reason the strigh import into infopath won't work, since every variable would be stored as an independent xml section, which makes the thing harder to parse and understand. Is there an easy way to do this?. Please let me know if my explanation is not clear enough or you need more info... thanks!
  • 12-28-2010 09:05 AM In reply to

    Re: Coding a fixed table to have a repeating table behavior output

    You say you have the data in a paper form, but what type of format is the data in when you are trying to import it into InfoPath?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-28-2010 09:14 AM In reply to

    Re: Coding a fixed table to have a repeating table behavior output

    The data is really not the problem, all I want is to be able to create that table without having to create 81 different variables to hold each possible value, hence, I want to group my values in a similar way that a repeating table does, but having the 27 possible test prepopulated... does that makes sense?
  • 12-28-2010 09:22 AM In reply to

    Re: Coding a fixed table to have a repeating table behavior output

    I see.  I suggest using a format like the one you described above and then using the Default Values dialog to prepopulate it with 27 rows that respectively have the <GeneticTest> values you want.

    If possible, you may want to consider having a fourth, non-displayed <GeneticTestCode> field that's also pre-populated with some concise code for each test (if you have one), as this could make it easier to process the collected data down the road.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.