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
9 replies
Subscribers
8 subscribers
Views
2519 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hello, I am trying to use for the first time the advanced form API an
fabienb
A Score Level 1
over 11 years ago
Hello,
I am trying to use for the first time the advanced form API and more specifically the "populateDropdown".
The function is just fine when I use two independent dropdown fields but does not work for two dropdown fields within a grid (I receive an exception).
I have been using the same code but I guess that I should adapt somehow:
FormAPI.populateDropdown("drop2", ["ETDE_GetParamByTypeMatching",FormAPI.getValue("drop1").id], "P02", "P03");
Any idea? Tanks again....
OriginalPostID-58370
OriginalPostID-58370
Discussion posts and replies are publicly visible
0
Ravichandran Thiruganasambandham (Ravi Sam)
Certified Lead Developer
over 11 years ago
For dropdowns in grids, you should use FormAPI.updateGridDropdown() function instead of FormAPI.populateDropdown. Here is the syntax for it.
FormAPI.updateGridDropdownValues([dropdown_id], [expression][row], [id_attr], [display_attr])
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Giobis
over 11 years ago
Sorry, where I can find the form API functions and any examples?
Thanks
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
fabienb
A Score Level 1
over 11 years ago
Thank you very much for your answer.
@biscontig: you need to go to shared components -> Librairies & utilities -> Advenced Forms Utilities
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
fabienb
A Score Level 1
over 11 years ago
Rachichandrant: could you tell what [row] is referring to? I don't manage to find any help on the forum to use updateGridDropdown.Thank you again
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ravichandran Thiruganasambandham (Ravi Sam)
Certified Lead Developer
over 11 years ago
There you have to pass [window.FormDesigner.lastRowEvent]
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
fabienb
A Score Level 1
over 11 years ago
Like this : FormAPI.updateDropdownValues("drop4", ["ETDE_GetParamByTypeMatching",FormAPI.getValue("drop3")], [window.FormDesigner.lastRowEvent], "P02", "P03"); ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ravichandran Thiruganasambandham (Ravi Sam)
Certified Lead Developer
over 11 years ago
Sorry i gave a wrong syntax, here is the correct syntax.Please use this
FormAPI.populateGridDropdown("dropdown4", ["getAllState",FormAPI.getValue("dropdown3").id.split(";")[window.FormDesigner.lastRowEvent]]);
hope this helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
fabienb
A Score Level 1
over 11 years ago
It DOES work ! Thank you very much for your help. I was getting nowhere without you. Best regards.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ravichandran Thiruganasambandham (Ravi Sam)
Certified Lead Developer
over 11 years ago
Happy to help!.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel