Grab single column from query

Sorry, i think it is a very simple task, but i am js beginner.
I have an sql query result. I want to grab a value of a single Column in an Input Field.

What is the JS command for that?

@franz You were so close. Try {{query_single_user.data.email}}

We all start as beginners :slight_smile: Please feel free to reach out to us anytime.

1 Like

i thought the same, but {{query_single_user.data.email}} is empty :frowning:

I see that your query is returning an array of objects. So to get this result you would have to use {{query_single_user.data[0].email}}

Also in your case it looks like you editing user details by selecting a row in the table. In that case it would be better to bind it as {{TableName.selectedRow.email}}

1 Like

Ok, now i know my fault!! I tried a lot of options… I tried e.g. {{query_single_user.data(0).email}} instead of {{query_single_user.data[0].email}} this one works :slight_smile:

to get the data from table worked, but the table data isn´t the same values, as the data from query. That why i have to grab the query data.

But thank you a lot!

2 Likes