Hi, I'm a newbie in infopath 2007, and I would like to understand how I can solve my problem: I've a product list on a secondary data source, based on a xml file.
Secondary file (products) is like this :
<Prodotti>
<Prodotto>
<ChiavePDV></ChiavePDV>
<CTV>15PF4121/01</CTV>
<FamilyType>LCD</FamilyType>
<Description>15" LCD Flat TV</Description>
<Brand>PHILIPS</Brand>
<PrezzoSuggerito>100.44</PrezzoSuggerito>
<Prezzo xsi:nil="true"></Prezzo>
<Quantita></Quantita>
</Prodotto>
......
</Prodotti>
I'm expected to save my template with some info reported on the main DS, all the information reported on the secondary file, plus the two info Prezzo and Quantità that have to be added on the form from the user.
The product list may be very long, so we decide to have it as a 2 ^ DS external to the template to be able to add products to the xml file easily.
The user has to see all the product list on the form, to add all the info required
So, my problem are:
1) I would like to filter all the data shown to the user on the Family Type field: I thought to define a field on the form, a drop down list box, whose list box entries are looked up from external data source (products).
2) I would like to have a table on the form reporting the product list that has to be completed (filtered on the family type choosen): how can I do it?
a) Can I define a table on the form, and the table directly refer to the secondary data source? (with the table field taken from the 2^ DS?)
b) Or I'm to define a table on the form, with fields defined on the main form, and I create a rule on field defined on the form, the drop down list box, to fill all the fields componing the table? It works only for the first row of the table.
3) Would it be a good idea to copy the secondary data source data on the primary on the loading form event and working on the primary fields?
Other ideas?
Thanks for your support.
Pietro