Best approach to design an infopath form with repeating (but not identical) sections

StackOverflow https://stackoverflow.com/questions/17295879

  •  01-06-2022
  •  | 
  •  

Pergunta

i'm an InfoPath noob, and i have to prepare a (quite complex) form. This form is made of two main areas: a summary page and one (or more) "element-specific" page(s). In the summary page the user must select one or more elements (with a maximum of 4) and fill some data. When the user selects one of those elements, the form should add the element-specific page related to the selected element. I have already created both the summary and the element-specific pages (all in a single view...is that bad?) for a single "element-type".

Now i'm having quite a problem. Due to the fact that the element-specific form is quite long and have different fields and validation logics, i really don't want to replicate (copy) all those fields and elements one by one (if i just copy the section, it will have the same field/value of the other element-type). I have seen the repeating/optional section, but those options doesn't seem to be good for my problem (in the summary page the user must check the element-type in order to enable some data fields that must be filled...and the checked items must be consistent with the sections that are shown. The user cannot add arbitrary sections like in the repeating/optional sections, the form (based on the checked fields) should show the correct sections)

Consider that some small details are different from a specific-section to another (i have to take some values of some fields from a specific section fields in the summary page and change an image) and i don't know how to handle those differences. Consider also that the final output of this work should be a printable pdf.

Here you can find some images mocking the result of the form:

1) This is the Summary Page: summary page

2) this is a mock of two detail pages. Please note that are the two ones "selected" in the summary. Specific page

3) this is a mock of the fields structure of the form: Fields specification

What i need is in fact to create 4 "mostly identical clone" sections, all with their status and values, with some minor differences from one to another. Is there any way to achive such result whithout having to create 4 different "sets" of fields, one for each specific element (that would obviously be a big amount of error-prone work)?

Sorry for the long post...hope it was clear enough.

Many thanks in advance

Foi útil?

Solução

Ok, so i've found a very good solution using template parts. I've designed some template part for the common form sections (following this guide on www.informit.com, then i've added them to the complete form template by building each block using,when needed, the right template part.

Thanks to teylyn for the help (luckly i didn't have to write to a list or use vb or c# code in my template part, only in the main template).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top