Select combobox item and save it with value to database

Hello All,

i have a combo box which gets dynamic values from an entity named "Get_Codes". Also i have an input form, named "money". 

I want the user to select one option from the combo box ,to fill a value in "money" field and upon pressing on save button, then the entity to be updated.

Any suggestion to advise or any example oml file to check?

Hi George,

Are your fields related? Do you need the money field to be updated once a user selects from the combo box? You could use the On Change property for this. It allows you to invoke logic once a user selects an option.

If they're both separate fields, then all you need to do is read the input values from the Form widget and write them to your database.

Thanks for your reply. I want the below.

1. User select one of the possible options.

2.Fill the money

3.Press the save button.

So, the fields are separated. As i have understand, need to get firstly the selected by user option. Due to i am not so familiar with combo box, your support is appreciated.

There's a good article on the combo box documentation here, but essentially you need to do three things:

 - obtain a list of the values that you're going to display. You can do this with an Aggregate by using the Source Record List property, or you can select an Entity in your combo box directly in the Source Entity property;

 - pick the field that you're going to display in the combo box - this is what the user sees and uses to distinguish between options. You can select it with the Source Attribute property;

 - have a variable to store the selected value. Usually, this will be the Id property of your Entity or List. This is what you need to look at when you need to know what the user has selected in the combo box.

See the attached OML for an example.