[ic] mv_metadata & derived (calculated) data

Mike Heins interchange-users@icdevgroup.org
Wed Jun 12 23:56:02 2002


Quoting Mike Heins (mike@valuemedia.com):
> Quoting David Kelly (david@zeald.com):
[snip]
> > How would I specify in the mv_metadata -> "products" record that to display 
> > the retail price it needs to use this new mv_metadata record "na:na"?  If I 
> > just list 'na' along with the other fields in the 'option' field then it just 
> > seems to ignore it?   
> 
> You need to use just that I think, na:na. I believe it should get put in
> the display_only group. Looking at it though, I don't see how the code
> does that. You can do it by the link you call things with (i.e. add
> ui_display_only=na:na), but what we need is an extended.display_only
> setting which will be read and honored.
> 
> > 
> > Do I need to alter the table editor tag so that when it comes across a entry 
> > under 'options' that is not a valid field in the database table it first 
> > checks the mv_metadata for a valid record for it before it just ignores it?
> > 
> > Hope that makes sense.
> 
> It does. I think the above, honoring display_only for a field thereby
> obviating the need for it to actually exist, is what we need.
> 

Actually it will honor that already, I discover. If you can
get extended.ui_display_only set to "na", you can use the field
name "na" without having a column of that name.

I think this patch to lib/UI/pages/admin/db_metaconfig_edit.html 
will get it (only for 4.9, mind you):

--- /DP/db_metaconfig_edit.html	Tue Oct  9 16:40:37 2001
+++ /dp/db_metaconfig_edit.html	Wed Jun 12 23:52:33 2002
@@ -70,6 +70,7 @@
 		code							=> 'View::Table',
 		name							=> 'Description',
 		'extended.ui_data_fields'		=> 'Fields to edit',
+		'extended.ui_display_only'		=> 'Fields for display only',
 		'extended.left_width' => 'Width specification for label column',
 		'extended.table_width' => 'Width specification for editor table',
 	}`
@@ -78,6 +79,7 @@
 		code							=> 'hidden_text',
 		name							=> 'value',
 		'extended.ui_data_fields'		=> 'move_combo_8',
+		'extended.ui_display_only'		=> 'text_40',
 		'extended.table_width'		    => 'text_8',
 		'extended.left_width'			=> 'text_8',
 	}`

-- 
Mike Heins
Perusion -- Expert Interchange Consulting
phone +1.513.523.7621      <mike@perusion.com>

Research is what I'm doing when I don't know what I'm doing.
-- Wernher Von Braun