Displaying other values from a dropdown

I have a dropdown defined with a data source from a server connect and it’s working fine, but I’d like to display some other columns in controls next to it. Like when the user selects a customer, display the address for that customer. The columns for the address are in the data source, so is it possible to display them on the page?

If I understand your question, have a look at

Instead of the information being displayed in a modal, you can set it up next to the dropdown. The trigger can be an on change event while the value can be retrieved from the dropdown.

Yes, you can edit the attribute that defines the text displayed to be an expression like

company_name + ‘ - ‘ + company_address

Yes that’s what I was asking. I thought of the Data Detail component and was able to get that to work. Wasn’t sure if that was the proper way or not, but seems to work well. I didn’t even use the on change event, just used the Value property of the Data Detail component and set it to the CustomerID input value. Works great.
image

Now, I have a harder scenario. What if the fields you’re working with are in a repeat? Like in the case where you select the product and you want to display the price, but it would be the price for each separate row in the repeat? How do you go about that?

It just needs a repeat area as in

What I’m trying to do is in a form with a repeat of input fields. I was able to get it to work with another data detail component for the products. When the user selects a product from the select control, it sets the id of the product in the data detail component, and then sets the unit price from the data detail component.

Here is the data detail:
image

The select control’s on changed event is:
dmx-on:changed="dd_products.select(value.toNumber());inp_UnitPrice.setValue(dd_products.data.UnitPrice.toFixed(2))"

Now as the user is filling out the form, the unit price is updated according to the product seleted.