Dropdown list fill from secondary source adds blank value at top

E

emailmygroup

Hi there,

I have InfoPath 2003 SP 2. I want to have a dropdown list value
filled from outer xml file. I created secondary data source for the
xml file. In dropdown list property, I put list box entries as
secondary data source. Now when I run it, the drop down list is filled
with data from xml file but it adds a blank option at the top of the
list. Is there any way I can remove it? or can I change it to
"Select..."

Thanks
 
D

David Dean

The blank option appears because the default value for the field is an empty
string. If you set the default value for the field to one of the values
listed in the dropdown, the blank option will no longer appear.

If you want "Select..." or some other string to appear when the field is
empty, your XML file will need to provide both a value and a description for
each repeating element. You can then add an element to the top of the XML
file that has a blank value and a description of "Select...".
 
V

Virtualspy

You set the default value on the data connection field on the right where the XML schema resides, NOT the drop-down control on the form. I had that problem also... cheers.

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 

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