My item under the replicant has two options ( using radio button)one for publish and other for non publish. But the user can createMultiple relicants . but they can choose ten publish at a time I want to find out the count of publish option selected by the user.The code is attached , which will display the number of replicantsbut not the options selectedPlease recommend , what function or code change can display the count for the selected optionsThanks-Vin[HTML] // Script to count the the publish optionsinit();function init() { IWEventRegistry.addFormHandler('onSave', errorValidation); }function errorValidation(button) { var publishes = 0; var val; var replicants = new Array(); replicants = IWDatacapture.getItem("/root/publish").getChildren();for (var count =0;count < replicants.length(); count++){val = replicants[count].getItem("YOUR ITEM NAME").getOptions()[item.getValue].value;if(val == true) {publishes = publishes + 1;}}[/HTML]
Please find the code Inline. Not tested but hopefully will work
val = replicants[count].getItem("/choice").getOptions()[item.getValue].value;
no luck
-Vin
val = replicants[count].getItem("/choice").getOptions()[item.getValue].value; no luck -Vin
msg returns null value
Did you copy the complete code? Can you post your Complete code to the post... Also try doing an alert just before the above statement for replicants[count]. See if that gives you a value and post back the value
The error was due to the wrong pathid variable and I fixed it