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

Home » RADICORE » How To » override noedit on foreign field in multi2
override noedit on foreign field in multi2 [message #1430] Tue, 08 July 2008 13:45 Go to next message
lyndonj is currently offline  lyndonj
Messages: 5
Registered: January 2008
Junior Member
Hi,

is there any way to override the noedit on a foreign field in the inner rows of a multi2 - I've tried unsetting noedit in _cm_changeConfig and not seeing the foreign field in the fieldspec tried adding it to the field array? I realise its disabled for a very good reason but was hoping I would then be able to add a bit of custom code to separate the foreign field data and its primary key to update the foreign table prior to the update of the main table.

basically I'm trying to add/update many rows showing member(one) and membership (many ie each year) in a single screen. The outer table of the multi2 is the branch. With hundreds of members per branch I was hoping to be able to mimic the simplicity of our existing msaccess app which can add and amend member names and current year membership details in a single multirow screen.

Thanks

Lyndon
Re: override noedit on foreign field in multi2 [message #1431 is a reply to message #1430] Tue, 08 July 2008 14:42 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
The 'noedit' property can be removed at runtime with code similar to the following in the '_cm_changeConfig()' method:
unset($this->fieldspec['fieldname']['noedit');

It is not sufficient to turn 'noedit' = 'y' into 'noedit' = 'n'.

If the field is part of the primary key then removing the 'noedit' property will have no effect.


Re: override noedit on foreign field in multi2 [message #1493 is a reply to message #1431] Wed, 16 July 2008 20:26 Go to previous messageGo to next message
lyndonj is currently offline  lyndonj
Messages: 5
Registered: January 2008
Junior Member
Took me a while to sort it out due to my lack of understanding and some data and validation errors preventing the updates but now working well with very little code thanks to your excellent framework. Merged foreign fields in _cm_getForeignData, added fieldspecs in _cm_changeConfig and a couple of lines in _cm_post_updateMultiple to update the foreign table using the same data and only a couple more to merge messages and errors from both tables.

Thanks

Lyndon
Re: override noedit on foreign field in multi2 [message #1494 is a reply to message #1493] Thu, 17 July 2008 04:27 Go to previous message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
I'm glad you got it sorted out. Once you understand the logic of the Radicore framework it is amazing how much you can do with so little code. It does simple things very easily, but when things start becoming less simple it is just a matter of knowing what custom code needs to be put into which custom method.


Previous Topic: proportional scaling of thumbnails in filepicker (for images)
Next Topic: How to filter by a parent field in a link1 transaction
Goto Forum:
  


Current Time: Thu Nov 21 18:11:19 EST 2024

Total time taken to generate the page: 0.00964 seconds