I display the username and send the id to the database; the problem is that i don't know how to set the value when selecting from the db. If i do
myForm.getForm().findField("id_user").setValue(record.data.id_user);
I see the id and can't see the correct displayName ... how can i assign the pair id/name to the combo so that it displays the name and sends the id?
Thanks in advance !
setValue should work. If it can't find the value in the store it will just show it in the combobox. Double check that the value you are setting is present in the field id_user in one of the records in your store. Make sure it's a perfect match, including case-sensitivity and data-type (string, number, etc.).