Forum Discussion
sbkeenan
11 years agoFrequent Contributor
Hi Tim
Are you just looking for an array of the values that appear in your dropdown? If so, you could try this:
The line within the for loop in this example finishes with item(1) because that's the location of the item I'm looking for in the ItemArray property in my example. You'll be able to see what item number to return in your LookUp Edit control by referring to the ItemArray property at the same level. Bear in mind that it's zero-based.
To demonstrate that the array has been populated with the values from your control, you can call the function like this:
I hope this is what you're looking for.
Regards
Stephen.
Are you just looking for an array of the values that appear in your dropdown? If so, you could try this:
function getLookUpEditItems(lookUpEditCtrl)
{
var numItems = lookUpEditCtrl.properties_2.dataSource.count;
var itemList = new Array();
for (var i = 0; i < numItems; i++)
{
itemList = lookUpEditCtrl.Properties_2.DataSource.Item(i).Item(1);
}
return itemList;
}
The line within the for loop in this example finishes with item(1) because that's the location of the item I'm looking for in the ItemArray property in my example. You'll be able to see what item number to return in your LookUp Edit control by referring to the ItemArray property at the same level. Bear in mind that it's zero-based.
To demonstrate that the array has been populated with the values from your control, you can call the function like this:
function tester()
{
var cboCtrl = <whatever your control is>;
var ctrlItems = getLookUpEditItems(cboCtrl);
for (var eachItem in ctrlItems)
{
Log.message(ctrlItems[eachItem]);
}
}
I hope this is what you're looking for.
Regards
Stephen.
Related Content
- 9 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago