[ic] Using VIEWS for custom metadata display - Howto
Paul Jordan
paul at gishnetwork.com
Mon Feb 20 15:11:28 EST 2006
Hello
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
record:
Code type options
transactions::status select
pending=Pending,packaged=Packaged,shipped=Shipped,canceled=Canceled,HOLD=HOL
D
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
pending=Pending,packaged=Packaged,shipped=Shipped,complete=Completed
Now I can show the options I want for the status of the rma transaction
record by:
[display arbitrary="rma" table=transactions column=status
key="00002"]
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
key="00002"]
and
[display lookup_exclude="s/canceled//" table=transactions
column=status key="00002"]
and
[display override='lookup_exclude="canceled"' table=transactions
column=status key="00002"]
Just wouldn't work, but figure that is not their intent.
HTH
Paul Jordan
More information about the interchange-users
mailing list