Struggling hard with this!! Drop down list with Repeating section

P

Partha

Given a secondary data source in the form of XML file below, I want to create
an infopath form where I have the drop down list for
testfile/customer/@cusname and upon selection of the customer, I want to see
the testfile/customer/program elements as a repeating table/section.

On saving the form, I want to see the data only relevant to the customer I
selected. Samples below.

SECONDARY DATA SOURCE:
<testfile>
<customer cusname="Microsoft">
<program prgname="prg11">
<cmdline>cmdline11</cmdline>
<duration>duration11</duration>
</program>
<program prgname="prg12">
<cmdline>cmdline12</cmdline>
<duration>duration12</duration>
</program>
</customer>
<customer cusname="SoftMicro">
<program prgname="prg21">
<cmdline>cmdline21</cmdline>
<duration>duration21</duration>
</program>
<program prgname="prg22">
<cmdline>cmdline22</cmdline>
<duration>duration22</duration>
</program>
</customer>
</testfile>

EXPECTED SAVED FORM TO BE: (when Microsoft is selected from the drop down
list):
<customer cusname="Microsoft">
<program prgname="prg11">
<cmdline>cmdline11</cmdline>
<duration>duration11</duration>
</program>
<program prgname="prg12">
<cmdline>cmdline12</cmdline>
<duration>duration12</duration>
</program>
</customer>
 
K

Kalyan Reddy

Hi,

Make the drop down as read only on save so that only the selected value and
its elemenst are shown when the saved form is open
 
K

Kalyan Reddy

Hi Again,

Try this work around

Insert an expression box and get the value into it from the drop down
Now create a text box (file name) which gets the value once the form is saved
Put a condition on this text box(file name) to hide the expression box and
show drop down when the file name is blank and show expression box and hide
the drop down when the file name is not blank.
 
P

Partha

Thanks Kalyan.

I am still not clear, if this helps my scenario or not. Let me clarify my
issue little further.
I want to read the secondary data source and save the data in the main data
source. (Obviously I need to populate the fields in the main data source from
secondary data source). The way I need the form is, Based on drop down list
selection, I want to populate the main data source fields' data from the
secondary source. (repeating section)

In the example, I have customer as a ddl. Upon selection of value in it, I
want to read only corresponding elements in the secondary data source XML for
that customer and populate them as repeating table/section controls in the
main data source.

Let me know, if there is any options to achieve this.
(I will also post this in infopathdev forum)

Thanks,
Partha.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top