getUniqueItems

I have a datasource populating a form and it works great. I tried an optional datasource for a form field, and it will load all the items correctly. However when I try to use the getUniqueItems, it still returns all records from the optional datasource, The code is listed below: The sort works, but the getUniqueItems does not. Any suggestions?

{name: "lir_outbound_profile",
					editType:"comboBox",
					optionDataSource: lir_outbound_route,
					autoFetchData:false,
					dataArrived: function (startRow, endRow, data)
						{
							data = data.allRows.sortByProperty("lir_outbound_route_name",true );
							lirForm.getItem('lir_outbound_profile').setValueMap(data.getProperty("lir_outbound_route_name").getUniqueItems());
						},

					title:"Outbound Profile",
					length:64,
					width: 150 },

Thank You
Tom C.

OptionDatasource tells the FormItem to manage the valueMap automatically, so your override is being ignored. If you want to manually fetch a valueMap and eliminate duplicates, do so via DataSource.fetchData instead (see the docs for that API)

Thank you for the info. Reading the doc’s and doing some testing, I have the application working correctly.

Again, Thank You.

Tom c.