[ic] Using VIEWS for custom metadata display - Howto

Paul Jordan paul at gishnetwork.com
Mon Feb 20 15:11:28 EST 2006


If you are like me, and like using the [display] tag for stable widget
building, I thought I'd mention "views".  For example, to view the meta
display for a order status:

	[display table=transactions column=status key="00002"]

However, lets say you are making a custom order return interface. "shipped"
might be irrelevant, and you might have other statuses that you'd like to
include. So, if you take a look at the mv_metadata table, you might notice a

Code			type	options
transactions::status	select

Lets say I want to have different options for the "status" field in my RMA
views. I might make another record as so:

Code				type	options
rma::transactions::status	select

Now I can show the options I want for the status of the rma transaction
record by:

	[display arbitrary="rma" table=transactions column=status

Of course, I used this as an example, so no comment is necessary on the
"options" I presented. This is a powerful way to build custom views for
things like... Custom product entry pages for product categories,
prod_group, etc. Custom admin pages for "dumbing down" options presented to
a user that might not be relevant.

This was actually a function I had Perusion build into IC years ago, but
forgot about it. ADMIN fully supports it out of the box. I got a refresher
when trying to figure out why:

	[display lookup_exclude="canceled" table=transactions column=status
	[display lookup_exclude="s/canceled//" table=transactions
column=status key="00002"]
	[display override='lookup_exclude="canceled"' table=transactions
column=status key="00002"]

Just wouldn't work, but figure that is not their intent.


 Paul Jordan

More information about the interchange-users mailing list