Interface Definition: Expression evaluation error [evaluation ID = 7RA1FXBO] : An error occurred while executing a save: Could not cast from Number (Integer) to HRO_role. Details: CastInvalid

 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