How to show the retations of a nuPicker.RelationLabels on the template?
I've got a relation between a doctor and his investigations. A doctor can have many investigations and one investigation can have many doctors.
To select a doctor on the investigation document type, I use a nuPickers.LucenePrefetchListPicker. The relationship is bidirectional. On the doctor document type I've added a property editor nuPickers.RelationLabels. This shows me the investigations he has made.
Inside my template on the doctor document type, I'll show the investigations he has done. Here is the property that is generated on the doctor class:
[ImplementPropertyType("investigations")]
public object Investigations
{
get { return this.GetPropertyValue("investigations"); }
}
If i call this property the result is null. My question is now: How could I show all investigations of a doctor on the doctor template?
How to show the retations of a nuPicker.RelationLabels on the template?
I've got a relation between a doctor and his investigations. A doctor can have many investigations and one investigation can have many doctors.
To select a doctor on the investigation document type, I use a
nuPickers.LucenePrefetchListPicker
. The relationship is bidirectional. On the doctor document type I've added a property editornuPickers.RelationLabels
. This shows me the investigations he has made.Inside my template on the doctor document type, I'll show the investigations he has done. Here is the property that is generated on the doctor class:
If i call this property the result is
null
. My question is now: How could I show all investigations of a doctor on the doctor template?P.S.: I'm using Umbraco 7.6
Hi Hein,
Have a look at this Wiki page on the GitHub project - I think it explains how to get the various Pickers' values;
Hope that helps,
/Chriztian
Sorry this didn't work...
I've added this code:
and calls the property using this code:
This gives me an
NullReferenceException
on the marked line.After debugging I've seen this:
PS:
OnderzoekenLabels
is a translation ofInvestigationsLabels
.There is the value of the
nuPicker.RelationsLabels
How could I solve this?
is working on a reply...