close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Manage Relational Table - Working Tutorial?

Thread began 12/16/2010 10:44 am by Andrew Read | Last modified 5/10/2011 11:42 am by Andrew Read | 6372 views | 21 replies

Andrew Read

Update - Final Solution and Guide

OK - I believe that I have everything working now and I hope that this information helps others to figure out how to use the Manage Relational Table (MRT) function of DataAssist.

In order for this to work you will need the following:
· 3 tables:

o One Master table for your main data (Main Table);
o one table for the options that you would like to select (Options Table);
o and one table with three fields (unique ID, main table ID and option table ID) that will join the options to the main table items (Relational Table.)
· DataAssist Insert and Update pages created for the main data table.
Once you have created the tables and the DataAssist Insert and Update pages you need to take the following steps.

On the Insert Record page:

  1. Delete the $WA_redirectURL value from the insert record behaviour.
    $WA_redirectURL = "redirectionpage.php"; will become: $WA_redirectURL = "";
    This will be re-added to the MRT behaviour.
  2. Create a Recordset that will retrieve all of the options that you wish to have displayed from your options table.
  3. Add a single checkbox that will be repeated to allow you to choose your options.
    The checkbox “name” and “id” can be anything (suggestion: OptionBox)
    The value of the checkbox will need to be set to echo the unique ID of the Options Table Recordset.
    The Label for the checkbox should be changed to the applicable option name from the Options Recordset.
  4. Add a repeat region to surround the checkbox and it’s label and have it repeat ALL of the options from the Options Recordset.
  5. Add the Multiple Relational Table Server Behaviour.



  1. On page 1 of the Wizard:

    • Set the trigger to “Button: Insert Pressed”
    • Select your Relational Table (joining table)
    • Re-add your redirection page that you removed in step one.


  2. On page 2 of the Wizard:

    • Set the “Foreign key column” to the main table ID from the Relational Table.
    • Select the appropriate “Data type.”
    • Set the “Key value” to echo the SESSION variable from the DataAssist Insert page (WADA_Insert_etc)


  3. On page 3 of the Wizard:

    • Set the Foreign key column to the option table ID from the Relational Table.
    • Select the appropriate “Data type.”
    • The “Options Form Field” should automatically populate with the checkbox in your repeat region, if not then select it.


  4. On page 4 of the Wizard you should not need to make any changes unless you have additional bindings to insert into the Relational Table, so just click Finish.


Your Options should now automatically update into your Relational with your main page records.

On your update page you will need to repeat the previous procedure with the only difference being that the “Main Table Join” “Key Value” on page 2 of the Wizard will be set to echo the main ID from the main Recordset for the update page.

Do not forget to add a second delete behaviour to the Delete page which will remove the records from the Relational table when you delete the main item.

I hope this helps clarify how exactly the MRT works, if I need to make any changes or if you have any questions – post away. :o

For those that are interested - the issue I was having with records changing other records information was, I believe, related to the fact that my MAX_FILE_SIZE was too small and a file upload was failing and causing the INSERT to fail.

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...