20
Views
8
Comments
Combo box to fill in input boxes
Application Type
Traditional Web

1. I have a combo box that stores names which works and all the names are showing, which are coming from the database

2. My input fields are: address, state, city, phone number, sales order, PO orders.

3. My issue is when I select the name from the combo box it is not filling in the input fields in the form. 

5. In the preparation I pulled in getcustomer and use a filter CustomerID = customerID



mvp_badge
MVP
Rank: #131

Hello Tom,

Are you filling the form with a result of a query?

If you are doing that, you need to call a action on Onchange property of the combo and do a query refresh and ajax refresh of the form. That should works. Can you try it?


BR,

Luís 

Rank: #59423

I do have a onchanged action with my combo box.

I am using a input parameter for the combo box. 

My combo box is in the action of the template.

My form is in the main part of the template.

The database  is the entities of  out systems but I did not think about trying to query it.

I have not used out systems in a while and I have forgotten a few things.

Rank: #469

HI Tim

Luís is right, you have to call ajax referesh action inside onchange action.

Can you share the oml file or some screenshot for detail? So we can look into it.

Kindly Regards

Rank: #59423

I try to cut this down and make it simpler with two input boxs

The database is the Entities from Outsystems
Custom
Id
Name
Age
NameId


1. Combo Box  (The combo box works)
 input parameter: nameId

OnChange -> Ajax Refresh


2 Form: GetCustomById.List.Current
       input box: GetCustomById.List.Current.Custom.Name
 input box: GetCustomById.List.Current.Custom.Age


Preparation -> GetCustomerrById

using filter nameID = Customer.Id

Rank: #616

Hi Tim,

From your image I see that you refresh the screen before reading the data, so you should do the reverse, read the data and then refresh the screen.

Rank: #59423

Thank you all your help. It works.