field — quickly retrieve field from Products database


Attribute Pos. Req. Default Description
name | column | col | field Yes Yes
code | row Yes Yes
interpolate     0 interpolate output?
hide     0 Hide the tag return value?


The tag conveniently retrieves the field from the databases listed under ProductFiles. It will return the first entry found in the series of product databases, so if you are only looking for a specific table, better use the generic [data] tag.


This tag does not appear to be affected by, or affect, the rest of Interchange.


No examples are available at this time. We do consider this a problem and will try to supply some.


If you only have one ProductFiles database — products, then [field column key] is, of course, the same as [data products column key].


field is available in Interchange versions:

4.6.0-5.9.0 (git-head)


Interchange 5.9.0:

Source: code/SystemTag/field.coretag
Lines: 18

# Copyright 2002-2007 Interchange Development Group and others
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# $Id: field.coretag,v 1.4 2007-03-30 23:40:49 pajamian Exp $

UserTag field               Order        name code
UserTag field               attrAlias    column name
UserTag field               attrAlias    col name
UserTag field               attrAlias    row code
UserTag field               attrAlias    field name
UserTag field               attrAlias    key code
UserTag field               PosNumber    2
UserTag field               Version      $Revision: 1.4 $
UserTag field               MapRoutine   Vend::Data::product_field

Source: lib/Vend/
Lines: 370

sub product_field {
  my ($field_name, $code, $base) = @_;
#::logDebug("product_field: name=$field_name code=$code base=$base");
return database_field($Vend::OnlyProducts, $code, $field_name)
  if $Vend::OnlyProducts;
#::logDebug("product_field: onlyproducts=$Vend::OnlyProducts");
my ($db);
  $db = product_code_exists_ref($code, $base || undef)
  or return '';
#::logDebug("product_field: exists db=$db");
  return "" unless defined $db->test_column($field_name);
  return $db->field($code, $field_name);


Interchange Development Group


price(7ic), data(7ic), description(7ic)

DocBook! Interchange!