close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Manage relations problems

Thread began 7/07/2009 8:46 am by olle189996 | Last modified 7/31/2009 6:44 am by olle189996 | 3009 views | 4 replies

Eric Mittman

I have done a bit of testing on the Manage Relational Table server behavior and can confirm it to be working as expected.

Here is the basic idea of how to use this server behavior.

1
Start on an insert or update page. You will first need to add a new recordset to your page to select the records from your secondary table, for example if you were configuring product options you would have a recoredset select all the records from your options table that you would like to associate with this product.

2
Once the recordset is in place on the page you will need to add the input to record the values of this secondary table. In regards to the example above you can add in a checkbox.

3
Next you will need to associate this new input with your new recordset. For the value you can bind the id from the new recordset, and for the label you can just use whatever value from the recodset would best reflect that record.

4
The next thing to go is to apply the repeat region server behavior to this new input and the label for it. In the repeat region server behavior make sure to choose your new recorset and let it display all records.

5
The final part is to add in the Manager Relational Table server behavior. When you add this server behavior you will fist need to specify the trigger and the relational table. For the trigger you can just use the button insert/update pressed. For the table make sure to select your relational table. Make sure you select the redirect page on this step.
On the next step you will select which column in your relational table will hold the id from your main table, you also need to select what type of data this will be and use the lightning bolt icon to select the id value that will be inserted here, it should be the id for the just inserted record held in the session varialble for an insert page and the id from the product recordset for an update page.

In the step after this you will select the column in the relational table that will hold the secondary table's id, like the previous step you will need to select the data type, for the value it should be defaulted to your repeat region input.

In step 4 of 4 you can set the value of the id or other columns in this table, if you have an auto incrementing id then you do not need to set a value for this column. You can finish it now to add the Manage Relational Table server behavior into your page.

When you test the page out you should see your newly added repeat region with the values from the recordset displayed. When you select these values and insert or update it should update your relational table.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...