The method is triggered by the OnDataChange event from selecting a element in a COMBOBOX. The method application.getMethodTriggerElementName can be used to determine the name of the COMBOBOX that produced the trigger. Is there a method to determine that value was selected in the COMBOBOX action that provided the trigger event?
I think this one may solve your problem:
var combo_value = controller.getDataProviderValue(elements[application.getMethodTriggerElementName()].getDataProviderID());
Thank you very much for your assistance. Unfortunately the proposed
code only returns “undefined”. Evidently the data provider value is
not yet loaded at the time of declaration of ondatachange. The frustrating
thing is that the user has already made the choice of data, so the data
should be available. Evidently the value does not become available until
a new record is inserted and the value is placed in to the new record.
I tested it on a sample application… and works fine for me… also on a new record…maybe you can try it on the debugger (on a simplefied new form)… and start checking if the .getDataProviderID() and getMethodTriggerElementName() returns the expected values…