Date index for Aug 2002
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [achievo] [DEV] Display related value
Hi,
> Hopefully, this isn't "Part IV" of the tutorial!
No, that will be in part 2 as well..
Actually, I usually completely hide the manytoonerelation (AF_HIDE), since
it's usually obvious that they belong to the parent, and I don't want my
users to move the child records from one record to the other.
But if you want to display them, then here's what you need to do:
in the class that is going to be displayed (the 'parent' class), create a
function like this:
function descriptor_def()
{
return "[name]";
}
What you actually return is some kind of 'template' that is used to display
the records. Between the [] you can put any field from the class.
You can also use multiple fields, for example the descriptor of a person
could be "[lastname], [firstname], ([city])".
Greetings,
Ivo