Dropdownlist control in Infopath

S

sreedhardasi

Hi,

I have the following questions about Infopath. Any help would be
appreciated.

1. Can we populate a dropdownlist at run time from an XML file?
2. Can we add new dropdownlist controls at run time to the Infopath
form? Our scenario is that we will have a dropdown with a master list
of values. Based on the selection in the master list, we need to add
and populate child dropdownlist controls to the form (The count of
child controls depends on master data and the data is stored in an XML
file)
Eg:
<root>
<ProductGoup type="Veg">
<product>Tomato</product>
<product>EggPlant</product>
<product>Potato</product>
</ProductGroup>
<ProductGroup type="Fruit">
<product>Mango</product>
<product>Orange</product>
</ProductGroup>
</root>

In this case, master dropdown will have Productgroup types. If the user
chooses "Veg", 3 dropdownlists should be added with the products. If
the user chooses "Fruit", only 2 dropdownlists should be added with the
products.
3. Does Infopath have a colorpicker control?

Thanks,
Sreedhar
 
R

Ramana

Hi sreedhar,

We can populate a dropdownlist at run time from an xml file,

i think it is not possible to create dropdowns at run time, we can show the
dropdowns based on selected value in master drop down(using comditional
formatting)

Thanks.
 
G

Greg Collins [InfoPath MVP]

1. Yes - populating a DD list via an XML file is supported and easy to do.

2. Because your structure has "product" repeating, you can have a repeating section bound to product, and place a drop-down inside there. That way for Veg, you will get 3 drop-downs, 1 for each "product".

3. No - there is no color picker control for an InfoPath form.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


Hi,

I have the following questions about Infopath. Any help would be
appreciated.

1. Can we populate a dropdownlist at run time from an XML file?
2. Can we add new dropdownlist controls at run time to the Infopath
form? Our scenario is that we will have a dropdown with a master list
of values. Based on the selection in the master list, we need to add
and populate child dropdownlist controls to the form (The count of
child controls depends on master data and the data is stored in an XML
file)
Eg:
<root>
<ProductGoup type="Veg">
<product>Tomato</product>
<product>EggPlant</product>
<product>Potato</product>
</ProductGroup>
<ProductGroup type="Fruit">
<product>Mango</product>
<product>Orange</product>
</ProductGroup>
</root>

In this case, master dropdown will have Productgroup types. If the user
chooses "Veg", 3 dropdownlists should be added with the products. If
the user chooses "Fruit", only 2 dropdownlists should be added with the
products.
3. Does Infopath have a colorpicker control?

Thanks,
Sreedhar
 
S

sreedhardasi

Thanks for your help.

On number 2, could you explain how to bind a repeating section to
product. I couldn't find this in Infopath. I am relatively new to
Infopath and I appreciate your help.

Thanks,
Sreedhar
 
G

Greg Collins [InfoPath MVP]

In your sample XML you showed a repeating set of <product> nodes.

These will show up in your data source (in the task pane) as a repeating field. Insert this "product" repeating field as a repeating section into the view. Then inside of that repeating section, add a drop-down list box .

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


Thanks for your help.

On number 2, could you explain how to bind a repeating section to
product. I couldn't find this in Infopath. I am relatively new to
Infopath and I appreciate your help.

Thanks,
Sreedhar
 

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