close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Manage Relational Tables - can't get it to work.

Thread begun 7/20/2012 9:15 am by John Langer | Last modified 7/24/2012 8:49 am by John Langer | 3236 views | 11 replies |

John LangerBeta Tester

Manage Relational Tables - can't get it to work.

Hi, I'm attempting (for the first time) to create a "Manage Relational Table".

I've created Detail, Insert, Search, Update and Results pages using the Data Bridge "DataAssist pages" function.

During the course of this I have set it up to create a list of options (called "Main Category"). This is displayed in list format so that multiple "Main Categories" can be selected.

I have created a main table (called "courses") an Options table (called "coursemaincategory") and a table for the join (called "coursemaincatoptions").

So far I have only attempted to apply this behaveour to the insert page.

With the insert page open, I opened up the Insert Record (course) behaviour and deleted the page redirection.

I then opened up a new Manage Relational Table behaviour.

On the first page I made the trigger "Button: Insert pressed"
Selected the connection and relational table (coursemaincatoptions)
I then set the "Go to" to "courses_detail.php?CourseID=<?php echo $_SESSION['WADA_Insert_course']; ?>" WADA_Insert_course is the session that Dreamweaver/webassist created.

On the next page I set the Foreign Key column to "FKcourseID"
Data type to Numeric
and the key value to "<?php echo $_SESSION['WADA_Insert_course']; ?>"

On the next page The Foreign key column was set to FKmainCatID
Data type to numeric
Options form field to "'FKmainCatID' Multi-select box"

The next page reported:
mainCatOptionsID Numeric
FKcourseID Numeric Automatically bound master key field
FKmainCatID Numeric Automatically bound joined key field

Clicking finish created "Manage Relational Table (coursemaincatoptions)" in the server behaviors panel.

I then tried it out by inserting a record. (This was on my local machine, none of this is on a server yet). The record was inserted into the courses table but the data inserted into the relational table (coursemaincatoptions) was


mainCatOptionsID FKcourseID FKmainCatID
1 1 0
2 2 0

As you can see the numerical values for the FKmainCatID were not entered.

I've spent quite a few hours trying to figure this out and I'm pretty sure I'm doing it correctly but am open to being wrong :-).

I've attached the files as well as SQL dumps of the tables.

Any pointers in the right direction on this would be appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

here is an updated copy of the webassist/database_management/wa_appbuilder_php.php file that should correct the problem. This is an issue that will be fixed in the next update to Data Bridge that should be released soon.

Sign in to reply to this post

John LangerBeta Tester

Thanks Jason, that worked.

Brilliant :-)

Sign in to reply to this post

John LangerBeta Tester

Spoke too soon

Hi Jason,

When trying to test this a second time it has failed to work (weird!).

Tried several times but all with the same result, just a big fat 0 entered into the column.

I'm attaching the insert file again for your perusal.

Sign in to reply to this post

Jason ByrnesWebAssist

did you make changes to the behavior or other changes to a data assist behavior
any time you make a changes using data assist, it will recreate the webassist/database_management/wa_appbuilder_php.php file in your site with the old one.

to prevent that form happening again after putting the updated one in your site, set the file to be read only so it cannot be overwritten.

Sign in to reply to this post

John LangerBeta Tester

Yes I did Jason. I'll do that, many thanks.

Sign in to reply to this post

John LangerBeta Tester

Yes that did it Jason. I'll make sure I remember that.

What I did was I added a second MRT to the page for a second multi select list. It didn't work and so I deleted it and then found the original didn't work either (this was because, as you said, the wa_appbuilder_php.php file had been overwritten).

I've now successfully inserted two MRT's to the same page using the updated wa_appbuilder_php.php file. Just for the help of others, I deleted the "go to" URL on the first MRT and added it to the second.

Brilliant!! Don't you just love WebAssist :-)

Sign in to reply to this post

Andrew Read

Originally Said By: Jason Byrnes
  did you make changes to the behavior or other changes to a data assist behavior
any time you make a changes using data assist, it will recreate the webassist/database_management/wa_appbuilder_php.php file in your site with the old one.

to prevent that form happening again after putting the updated one in your site, set the file to be read only so it cannot be overwritten.  



You can also replace the file in the configuration folder... that way it overwrites with the new file.

Sign in to reply to this post

Andrew Read

JS error on redirect file choice?

In regards to the MRT, which I am also getting to work now (thanks for the previous posts!) I am getting a JS error when I try to choose the redirect file within the wizard. See image.

FYI - showpost.php?p=84393&postcount=17 contains a tutorial on how to setup a MRT that I made for DataAssist (solo) and it still applies in DataBridge's DataAssist.

Sign in to reply to this post

John LangerBeta Tester

Yes Andrew I'm getting that error message as well but, in ignoring it, it doesn't seem to cause any harm i.e. it still works OK.

And thanks for the tip about putting that file in the config folder, I'll try that.

And... Thanks for that tutorial. It was by following that that I got my head around all this MRT stuff. Just the bug in Data Bridge that threw me.

Sign in to reply to this post
loading

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