Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » table related to itself
Re: table related to itself [message #842 is a reply to message #841] Wed, 23 May 2007 11:30 Go to previous messageGo to previous message
AJM is currently offline  AJM
Messages: 2368
Registered: April 2006
Location: Surrey, UK
Senior Member
You haven't explained very well what your problem actually is, so I'll have to take a guess.

You have a table called 'equipment' which contains a primary key called 'equipment_id'. It also contains a non-key field called 'parent_equipment_id' which is related back to 'equipment_id' on the same table.

In your detail screen you are using a popup control to provide a value for 'parent_equipment_id'.

I am assuming that the popup works correctly in that it displays entries and allows you to choose one, but after returning to the detail screen the chosen entry is not shown.

If you think about it the problem is quite straight forward - the popup is passing back a selection string like "equipment_id='abc'", but when this is received you want the value inserted into 'parent_equipment_id' instead. If this translation from 'equipment_id' to 'parent_equipment_id' is not being performed then the popup selection is being lost.

You can perform this translation manually in the _cm_popupReturn() method as shown in http://www.tonymarston.net/php-mysql/functions-and-variables .html#notes._cm_popupreturn, but if you are using the latest version of Radicore you may find that this can be done automatically by the code inside the popupReturn() method within 'std.table.class.inc'.

I hope this helps.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Display field from Related table 2
Next Topic: Using dropdown
Goto Forum:
  


Current Time: Sat Nov 23 21:55:53 EST 2024

Total time taken to generate the page: 0.01014 seconds