Hi I want to populate dropdown field on my form dynamically.I am on appian 7.2

Hi I want to populate dropdown field on my form dynamically.I am on appian 7.2
I am using following code
importScript('/plugins/servlet/FormsExt.js');
FormAPI.populateDropdown("txtMaterialCode", ["getMaterialCodeMappingExpRule","Carton","No"]);

Here
getMaterialCodeMappingExpRule is an expression rule which takes two parameters.


When I execute this code i get following error
"Unable to get value of the property 'options': object is null or undefined"

Any pointer to this will really be helpfull....

OriginalPostID-105563

OriginalPostID-105563

  Discussion posts and replies are publicly visible

Parents
  • Thank you so much Ajinkya and eduardo for your inputs on this issue.
    We also tried things at our end to take it to closure.
    We were able to solve this using

    importScript('/plugins/servlet/FormsExt.js');
              var txtComponent=FormAPI.getValue("drpdwnComponent").id;
              FormAPI.evaluateServerSideExpression(function(fn) {
              debugger;
              window.FormAPI.updateDropdownValues("txtMaterialCode",fn,fn);
              },["getMaterialCodeMappingExpRule",txtComponent,"No"]);
Reply
  • Thank you so much Ajinkya and eduardo for your inputs on this issue.
    We also tried things at our end to take it to closure.
    We were able to solve this using

    importScript('/plugins/servlet/FormsExt.js');
              var txtComponent=FormAPI.getValue("drpdwnComponent").id;
              FormAPI.evaluateServerSideExpression(function(fn) {
              debugger;
              window.FormAPI.updateDropdownValues("txtMaterialCode",fn,fn);
              },["getMaterialCodeMappingExpRule",txtComponent,"No"]);
Children
No Data