Get selected value from table in a edit view modal

Hi i got my app with a edit modal view like this

in the left i see the correct value is get it from table the value is ok, but in the modal edit view i cant show the selected value, how i can fix this?

thank you

In the default value field for that dropdown you should add {{yourtablename.selectedRow.data.asagnado}} I assume asagnado is the name of the column that contains the name of the column in the table where the row is selected.

1 Like

yes i tried that but not working

if i test by writing that same {{ listadevehiculos.selectedRow.data.asignado}} in Placeholder o any other place, then it shows correct selected item

I think the problem is that your id used in the dropdown for that field in the modal does NOT map to the value in the name field you are using in the selectedRow.... if you have a column where the id is also stored in the selectedRow then you can use that as the default value, but what I suggest is changing the dropdown in the modal from id to to whatever the name is of the asignado column - in this screenshot the label matches the column(I think) but the id may differ and that is why it won't show
Screenshot 2022-12-05 at 4.06.04 PM

1 Like

im confused, i think its because im using two tables also, i got that select values from example query #2 and the original table data came from query #1 but joined with a table of query #2

i just made the change and works, thank you