Node as my server model and MS SQL as the database backend. I need some help. Maybe I have been looking at it too long. I can’t get it to work. Here is what I have.
I have a Checkbox list that is populated from a table. I am inserting a one to many relationship into another table. That part works fine, as I can check as many checkbox items as needed and they are inserting into the database, with each checkbox value going into one record row. The problem is when I put those checkboxes in an edit form and try to dynamically check those based on the data from the one to many table.
This is what my checkbox list look like on the page:
I would check for a type mismatch…
Checkbox values are string, so please check the datatype of form-group value (scUserToLocationForBinding.data.queryUserToLocationListForBinding)
What type of data is returning? Numeric or String?
The insert is working fine, I do have that in a repeater and it is inserting multiple records into multiple rows. The issue is on the update, in the interface and to check the ones that are coming over in my datsource that is populating those cheacks.
dmx-bind:value="scUserToLocationForBinding.data.queryUserToLocationListForBinding"
You bind the whole query in the form-group or I am wrong?
You should bind there the field/column of that query that contains the value, right?
Yes! I think that is where the issue is. I have tried to bind just the LocationID field, but that does not work either. I don’t have something right for the binding. I am binding it to the checkbox group like the video shows, but I don’t know how to get just the locationID to bind to the checkbox.
Please lick the lightning bolt here and post a screenshot of the scUserToLocationForBinding.data.queryUserToLocationListForBinding fields that appears…
Please check that the right field of dmx-repeat:repeat1="scLocationList.data.queryLocations" is LocationId and not LocationID
(just in case)
**
Note 2: (edit)
So in your dmx-repeat:repeat1=“scLocationList.data.queryLocations” I suppose that the same uuid values are stored and you bind them to your checkboxes value. Because these values are going to be matched with the form-group value
ok, we are almost there… It is working, sort of. This is the issue I ran into earlier. So I did bind it to the LocationID and make sure all the field names match LocationID - LocationID and it does now bind to the checkbox… But only one. It has to do with the single row from the data binding: