Fill in the inputs according to the chosen table

Let's say I have two tables with data from the same table in my database.
The only difference is that my sql query that feeds them applies a WHERE on a column that is not the same.
Is it possible to feed inputs by letting the user choose which table he wants (using table1. selectedrow.etc). Here is a draw (best skills on Paint ever) of what i'm looking for :

Thank you

@AntoineOA
In the default value field in the inspect panel of input:


table 1 on the right is populating a text input
table4 on the left is populating a number input

Hey @ScottR

That's not really what I'm looking for. For example I want all my inputs to be fill with the selectedRow of table 1 OR the selectedRow of table 2, depending of the choice of my user.

OK so then do the following in each input field
{{table1.selectedRow.data.Amount || table2.selectedRow.data.Amount...and so on}}

Event handler on row selection set temp state with the data you want to populate into fields. Make the temp state the same for both tables and it will overwrite on selection. Then set the defaults for the fields to be the temp state.
selected rwodefault

Will "or" work in an input like that? I've never tried it that's interesting. How will it work if each table has a selected row? Setting a temp state that gets overwritten is more steps but seems much more foolproof.

The behaviour is a bit strange, there is no error in js but in any case, a default row is selected in both tables and the inputs are filled with the first table. I will investigate :face_with_monocle:

Thats ok for Js but result is strange, still doing some test! Thant you mate