One-to-one relationship linking

Discuss MySQL Ajax Table Editor Paid Version

One-to-one relationship linking

Postby tom » Thu Feb 05, 2015 1:01 am

Hi, I am setting up a connection between two tables, that have a 1:1 (one to one) relationship and trying to setup a connection between them when adding, and editing.

So far, I have a custom column with a link but now I must attempt including a second GET parameter in the querystring, not only the table name.

Is there a way to programmatically fire an advanced search on a specific field?

Alternatively, when adding or editing a record in the first table, I would be interested to automatically jump to the Add form in the second table, if the 1:1 relationship doesn't have a matching record in the second table.

Any way to do this without me spending a couple days building the code? :) I was happy to discover the pass-GET params thread on this forum. That made life so much easier!!
tom
 
Posts: 3
Joined: Thu Feb 05, 2015 12:54 am

Re: One-to-one relationship linking

Postby tom » Thu Feb 05, 2015 3:10 am

Success!
Less than 1 hour (plus dinner in-between), and I solved it myself. :D

It involved adding some javascript functions to the displayHtml, and adding jsonObject as a parameter to options.onCompleteFun within toAjaxTableEditor.

I do an inspection on jsonObject similar to the while() loop in displayInfo, and if the "recordLayer" value contains "Displaying 0 Records", then I run: instance.toAjaxTableEditor("add_row","",{updateHistory: false})

I will try building a clean code sample to post here later this week.
tom
 
Posts: 3
Joined: Thu Feb 05, 2015 12:54 am

Re: One-to-one relationship linking

Postby tommyto » Fri Oct 09, 2015 10:05 am

I have the same problem.
Please post your solution. thanks
tommyto
 
Posts: 3
Joined: Wed Aug 26, 2015 10:34 am


Return to Paid Version

Who is online

Users browsing this forum: No registered users and 1 guest

cron