on the product insert / update pages, you would need to use the Data Assist manage relational table behavior.
you would create a recordset to return the available options.
DONE - named rsMaterialoptions
add a checkbox to the page. Set the value of the cehckbox to use the optionID column from the option recordset, set the label for the check box to use the option name.
DONE - and confirmed it was loading properly
Now add a repeat region around the check box so it will loop through the option recordset to show all options.
DONE - all the proper rows repeat properly with the proper value
*1- If this is the update page we need to create a binding in Dreamweaver before proceeding. Open the results page for the products table in the web browser, click on the update button for any product to open the update page, notice the address in the browser has a querystring variable, it will look something like this:
DONE - mine is actually 'id', I'm using almost all the sample options database provided by web assist, but I'm tying it to my own existing master product table rather than the 'products' one provided.
Copy the name of the Querysting variable, in my example above it is "productID", then go to the bindings panel in Dreamweaver, click the plus button and select URL Variable, and paste the name that was copied from the browser. This will create a new databinding for the Query String variable used to load the product into the update page*
*-2 For the insert page, we need to find the name of the session that will be created when the product is inserted, go to the Server behaviors panel and double click the insert record behavior. In the session variable section, make note of the Save As setting, this is the name of the session that will be created.
cancel out of the insert record behavior, and go to the bindings tab, expand the session collection and make sure a session binding with the name from the save as setting in the insert record behavior exists*
DONE - update page still works properly at this point.
Next add the Manage Relational Table behavior.
On the first step, set the relational table to be the productsoptions table
On the Second Step, the "Main table Join" column is the productD column, set the data type to numeric.
- On the Insert page, click the lightning bolt next to Key value and select the Session variable that is created by the insert record behavior (refer to *-2 above)
- On the update page click the lightning bolt next to Key value and select the URL Variable used to populate the update page (refer to *-1 above)
DONE, set to id as noted above
On the Third step, set the foreign key column to the OptionID, for Options From Field, select the Repeating checkbox. on the forth step, you can review the settings and click finish