[color=#0000bb]IWDatacapture.getItem(Xpath.getValue()[/color]
[color=#007700]if (children == null) { return; }make it:[/color]
[color=#007700]if (children == null) { alert(Xpath); [/color]
[color=#0000bb]EventDropdown([/color]
[color=#0000bb]IWDatacapture.getItem(Xpath)[/color]
[color=#007700]}Now that will run EventDropdown on all items in your DCT, so you will want to make certain you restrict the actions. [/color]
Nipper,Actually I saw this code block in one of your previous postings. I've tried switching the getChildren with getValue, but it comes up as null. I'm trying to pull in the value from the drop-down item /global_calendar_event/event_type from all the replicants in the DCR. Then I'd like to display an alert to the end-user if the certain value has already been selected in one of the other replicants. I also have the following code that checks the value in the selection, but doesn't compare it to the other replicants.
var event_types_seen = new Array();function init() { checkAllLinks("/global_calendar_event/");}function checkAllLinks(Xpath) { alert ("got "+Xpath); var msg = ""; var children = IWDatacapture.getItem(Xpath).getChildren(); for (var i in children) { var etype = children.getChildByName("event_type").getValue(); // If event_type is a select list, then you need to expand the above to use getOptions()[...].value if (typeof event_types_seen[etype] == "undefined") { event_types_seen[etype] = true; } else { msg += "Duplicate Event Type Found: " + etype + "\n"; } } if (msg != "") { alert(msg); return false; } return true;}