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
1 reply
Subscribers
7 subscribers
Views
1115 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I want to set the drop down field values through js. I am using following c
achaugule
over 10 years ago
I want to set the drop down field values through js.
I am using following code.
importScript('/plugins/servlet/FormsExt.js');
var namespace = window.FormDesigner.runtimeNamespace;
if(namespace == null){
namespace = "JSON_TASK_NS";
window.FormDesigner.runtimeNamespace = "JSON_TASK_NS";
}
var a=new Array();
var b=new Array();
a.push("1");
a.push("2");
a.push("3");
b.push("One");
b.push("Two");
b.push("Three");
debugger;
window.FormAPI.updateDropdownValues("dropdown2",a,b);
This code snippet works fine.Giving display values as {"One","Two","Three"} and values to be stored as {1,2,3}.
I have to assign a default value to this drop down.
I used
window.FormAPI.setValue("dropdown2","Two");
but it is not working.Can anyone please suggest some way out here to assign a default value to this drop down field....
OriginalPostID-133628
OriginalPostID-133628
Discussion posts and replies are publicly visible
0
janakik
over 10 years ago
If the drop downs values are to be dynamic, then you need to be combine FormAPI.evaluateServerSideExpression() and FormAPI.updateDropdownValues() functions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel