Access Other Properties from Custom Property Editor
v15
I'm trying to build a display-only custom property editor that combines some information from other properties on the current document and displays some read-only instructional data to the user.
For example, if the document type has Text1 and Text2 properties, I want to display some read-only instructions in a third property, updated when those properties change, that says "Let your manager know if the {Text1} is already {Text2}".
Now I'm trying to get access, from that property editor, to other properties in the same document, and ideally observe them as they change but I'm not sure if that is possible or how to proceed. I can see how to watch my own UmbPropertyValueChangedEvent but not those of the other properties.
Anybody have some advice? Maybe a property editor is the wrong place for this. I guess I could build it out as a health check report or display this information in some other place if there is some mechanism more appropriate.
Access Other Properties from Custom Property Editor
v15
I'm trying to build a display-only custom property editor that combines some information from other properties on the current document and displays some read-only instructional data to the user.
For example, if the document type has Text1 and Text2 properties, I want to display some read-only instructions in a third property, updated when those properties change, that says "Let your manager know if the {Text1} is already {Text2}".
I started going through the custom property editor tutorial at https://docs.umbraco.com/umbraco-cms/tutorials/creating-a-property-editor and I was able to create a new property editor that displays a read-only string.
Now I'm trying to get access, from that property editor, to other properties in the same document, and ideally observe them as they change but I'm not sure if that is possible or how to proceed. I can see how to watch my own UmbPropertyValueChangedEvent but not those of the other properties.
Anybody have some advice? Maybe a property editor is the wrong place for this. I guess I could build it out as a health check report or display this information in some other place if there is some mechanism more appropriate.
I kept playing with it and got it working. The key was a 'PropertyDatasetContext' which links a property to its owner https://docs.umbraco.com/umbraco-cms/customizing/foundation/contexts/property-dataset-context
is working on a reply...