Select component data

Hello,

I have been trying to do this on my own for the past couple days but haven’t found a solution yet and haven’t found any videos that helped. This may be a dumb question with a simple answer that I’m just overthinking but how do I get the selection from select components to save in my data tables? I have the same question about sliders too. Any help would be appreciated.

When an item is selected in a dropdown component, use data binding to put the selected value into the data model. Then when a button to save the data in the database is clicked, get the values from the data model and save them in the database.

1 Like

Right so I fixed the select issue, it was something I was over looking. But now my question about the sliders. I have a ranged slider that I am trying to get to save in the data table but it is not working. Any insight on that?

Are you using data binding to capture the slider’s value?

Yes. It is set up the same way as the other sliders it’s just ranged.

Ok, if the data ends up in the data model, the rest of the process of saving the data in the database would be the same.

Right but for some reason it is not. The data records for the sliders with a single number but not the sliders with a range.

For a slider with a range, the value put into the data model is going to be a list of 2 numeric values, each value corresponds to the selected range (left and right)

Ok I understand what you’re saying. So how do I get that to record?

Use the “get property” block to read the value from the data model. The value you get back is a list of 2 elements.

I get that but what I don’t understand is how that records in the data table. I used the “get property” block for that but how is it recorded in my data table if I get back a list of 2 elements? How do I get both elements recorded? I have included pics of what I am referring to.
slidertable
sliderslider
slider

It depends on how you structured your database schema. One way is to have two INT columns and save each value of the slider range in the corresponding column.

Right which is what I tried after you said the value received is two elements but I’m not doing it right apparently. I don’t get how to save each value in the range separately.

This will do it:

Thanks this worked! FYI for anyone else who needs it, the left slider is ‘1’ and the right slider is ‘2’ in a ranged slider in this example. So the left would be “get # 1” and the right would be “get # 2”