One to One View/Edit no list?

A place for users and developers of the Xataface to discuss and receive support.

Postby Aoirthoir » Fri Sep 15, 2006 7:20 am

Ive taken someone else's data and imported it into MySQL. The main table was very large. We won't be using all of the fields from it. So until we decide which ones we will keep, I split it into six tables based on function. I did this by creating six exact copies of the original, then using an insert/select statement to pull all the records from the original table (still intact) into the other six. Then I used drop to remove fields from each table that it did not need. Of course I saved all the SQL for this, so it is now a copy paste to accomplish the entire thing, since all of this is still in the testing stages.

Next I removed the original table from references in conf.ini and added the first of the copied six. This way everything would follow my naming conventions, and the main fields would be what a user sees displayed from the main tab. Then in relationships.ini for the first table (D_PATIENT) I added one to one relationships for each of the other fields (D_PATIENT_DATE.ID = "$ID").

So of course I get the table list. With an offer to add new records. Of course I can eliminate that with actions:addnew = 0 in relationships.ini. Now what I would like to do is have it automatically go into the view/edit form. Either is fine. Though if it can match what the parent record is on, that would be fantastic.

Anyone have any suggestions?

Thank you kindly for hearing me.
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Fri Sep 15, 2006 9:12 am

I have been meaning to address this problem for a while but havent' gotten around to it. Currently you would have to create a custom action with category "record_tabs", that shows the one related record - and then set action:visible = 0 for the relationship itself.

This is not really a good solution though.. A better solution would be to designate a realtionship as one-to-one and have it automatically show up as a view/edit form. Hopefully I'll have time to add this before too long.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 25 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved