I have two data type entities one is Hro_role and Hro_project ,
in Hro_role which i used to store all roles ,in Hro_project Hro_role id is foreign key
Scenario:
when im using to dropdown to get roles from role table im able to get and when im saving to hro_project im getting this error any one please suggest me
a!sideBySideLayout( items: { a!sideBySideItem( item: a!dropdownFieldByIndex( label: "Project Manager", choiceLabels: {
"Developer",
"Tester",
"Appian Lead"
}, value: 1, saveInto: ri!HRO_Project.roleid ), width: "4X" ), a!sideBySideItem( item: a!textField( label: "M.I." ) ), a!sideBySideItem( item: a!textField( label: "Last Name" ), width: "4X" ) } ),
Discussion posts and replies are publicly visible
The first sentence in the documentation describes the reason for this behavior
https://docs.appian.com/suite/help/20.3/Dropdown_By_Index_Component.html
Could it be that the field type of roleid is not integer but Hro_role? Then you need to store a Hro_role in there, not only some number. BTW, in your code the drop down will always show the first item selected because of the value set to 1.