Combobox data from datasource

Hi

I need to populate country list on 2 combox boxes from datasouce.The combo boxes are placed on dynamic form containing lot many other fields.
I am able to populate the list of countries on the combo boxes… :slight_smile: ,the problem is other combo boxes apart from country on the dynamic form are also populating the same values :cry: .

Please guide where am I wrong.

Code snippet…

isc.DataSource.create({
    dataFormat:"xml",
    fields:{
        countryName:{name:"countryName"}
    },
    ID:"countryDataDS",
    recordXPath:"//country",
    dataURL:"/shared/ds/test_data/countryData.xml"
})

…

isc.DynamicForm.create({
    numCols:4,
    cellPadding:3,
    dataSource:countryDataDS,
    ID:"TransactionDetailsForm",
    autoFetchData:false,
    autoDraw:false,

…

{name:"SAddressLine3Text", ID:"SAddressLine3Text", title:"Seller Address Line3", 
                 _constructor:"TextItem"},
                


{click:"function(){countryDataDS.fetchData();}", focus:null, titleHover:null, 
                 name:"BCountryCombo",startRow:true, ID:"BCountryCombo", title:"Country", 
                 _constructor:"ComboBoxItem"},
                {click:"function(){countryDataDS.fetchData();}", name:"SCountryCombo", 
                 ID:"SCountryCombo",title:"Country", endRow:true, _constructor:"ComboBoxItem"},



                {name:"BOrgIdText", ID:"BOrgIdText", title:"Buyer Org Id", _constructor:"TextItem"},
                {name:"SOrgIdText", ID:"SOrgIdText", title:"Seller Org Id", _constructor:"TextItem"},
                {name:"BBankBicText", ID:"BBankBicText", title:"Buyer Bank BIC", 
                 _constructor:"TextItem"},
                {name:"SBankBicText", ID:"SBankBicText", title:"Seller Bank BIC", 
                 _constructor:"TextItem"}

Man, what in God’s name are you doing there?!

search the docs and the forum for optionDataSource … you’ll be in for a treat! :))

While being on this subject search for valueMap, too :slight_smile: