How to auto fill data, in text input, from a mapped selection?

Good afternoon people!

I made a connection with my database, in the options component, where after selecting mapped, I made this connection. Now, as soon as I type in the information, it appears.

But I would like to do it like this, by selecting a specific name, with the relation of values in the database, by selecting and clicking on the "Search" button - search. If it completes itself, the id, name, cnpj, branch and person in charge of the establishment. I'm kind of lost on how to do this.



If I am reading your post correctly, when the first query completes and you have selected that value, you can run an event handler to call query that will get the data from your database based on the selected value.

1 Like

+1 to Scott's comment!

It's also possible to use get the index of your selection with pesquisa_cnpj_nome2.selectedIndex and use that to access the data you need from for example {{[pesquisa_cnpj_nome2.selectedIndex] }} should get you the name of your selection.