Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
8 subscribers
Views
3601 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hi I want to populate dropdown field on my form dynamically.I am on appian 7.2
achaugule
over 10 years ago
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
0
ajinkyab277
Certified Lead Developer
over 10 years ago
Hi Amit,
In your code sniplet you have not given id_attr and display_attr. You are fetching material code object from rule, but what field of that object you need show in dropdown that u need to specify using id_attr and display_attr.
e.g
example1:
FormAPI.populateDropdown("txtMaterialCode", ["getMaterialCodeMappingExpRule","Carton","No"],"code","code");
here i am assuming that code is the field in CDT.
example2
FormAPI.populateDropdown("dropdown6", ["GetBusinessOriginDetailsByOriginCode", FormAPI.getValue("dropdown5").id], "code", "description");
kindly refer the attached Advanced form utilities guide
AdvancedFormsAPI_v1.6.0.pdf
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
ajinkyab277
Certified Lead Developer
over 10 years ago
Hi Amit,
In your code sniplet you have not given id_attr and display_attr. You are fetching material code object from rule, but what field of that object you need show in dropdown that u need to specify using id_attr and display_attr.
e.g
example1:
FormAPI.populateDropdown("txtMaterialCode", ["getMaterialCodeMappingExpRule","Carton","No"],"code","code");
here i am assuming that code is the field in CDT.
example2
FormAPI.populateDropdown("dropdown6", ["GetBusinessOriginDetailsByOriginCode", FormAPI.getValue("dropdown5").id], "code", "description");
kindly refer the attached Advanced form utilities guide
AdvancedFormsAPI_v1.6.0.pdf
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data