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
16 replies
Subscribers
8 subscribers
Views
5202 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hello everyone, I need help regarding Advanced Forms Utilities, exac
simonas
over 11 years ago
Hello everyone,
I need help regarding Advanced Forms Utilities, exactly POPULATE DROPDOWNS DYNAMICALLY. First of all, I have two CDTs.
The first CDT has one text parametar which is dropdown list, range parametar - boolean (yes/no), and ID. The second CDT has the same ID, and values which is the second dropdown.
I want this, when I choose text value from the first dropdown, the first ID to connect with the second ID and based on the second ID to show values in the second dropdown list. I want it on click and change.
Can I use this:
FormAPI.populateDropdown("dropdown6", ["GetBusinessOriginDetailsByOriginCode", FormAPI.getValue("dropdown5").id], "code", "description");
or this:
FormAPI.populateDropdownFromCDT = function(dropdown, expr, id_attr, display_attr) {
FormAPI.evaluateServerSideExpression(function(list) {
var ids = [];
var displays = [];
for (var i=0;i<list.length;i++) {
ids[i]=list[i][id_attr];
displays[...
OriginalPostID-45172
OriginalPostID-45172
Discussion posts and replies are publicly visible
Parents
0
simonas
over 11 years ago
Hey, tnx for your response. Here is my problem in specific.
I have 2 CDT:
First: ContractTypeDetails, with many fields like TypeName(text) and ValueRangeID(Number(Integer))
which are the essential for me.
Second: RangeofValues, with 2 fields: Valueid(Number(Integer)) and value(text).
The expression rule for the first CDT is GetValuerangeBySelectContract with one parametar
Contract (Text) and the definition is:
=ContractTypeDetailsR2()[lookup(ContractTypeDetailsR2().typename,ri!Contract)].ValueRangeID
I have tested it and it works, it returns the value range for specific contract.
The query rule for the second CDT is VALUERANGES where I sort query results by Valueid.
In my form I have 2 dropdowns:
First: Contract Type (Text), Choose from process data (FieldID:dropdown13)
Second: Value in range (Text), Choose from process data (FieldID:dropdown84)
I have put this on load of the form:
importScript('/plugins/servlet/FormsExt.js');
and on the first form on click:
FormAPI.populateDro
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
simonas
over 11 years ago
Hey, tnx for your response. Here is my problem in specific.
I have 2 CDT:
First: ContractTypeDetails, with many fields like TypeName(text) and ValueRangeID(Number(Integer))
which are the essential for me.
Second: RangeofValues, with 2 fields: Valueid(Number(Integer)) and value(text).
The expression rule for the first CDT is GetValuerangeBySelectContract with one parametar
Contract (Text) and the definition is:
=ContractTypeDetailsR2()[lookup(ContractTypeDetailsR2().typename,ri!Contract)].ValueRangeID
I have tested it and it works, it returns the value range for specific contract.
The query rule for the second CDT is VALUERANGES where I sort query results by Valueid.
In my form I have 2 dropdowns:
First: Contract Type (Text), Choose from process data (FieldID:dropdown13)
Second: Value in range (Text), Choose from process data (FieldID:dropdown84)
I have put this on load of the form:
importScript('/plugins/servlet/FormsExt.js');
and on the first form on click:
FormAPI.populateDro
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data