MIM 2016: Rules governing the use of XPath in RCDC

I want to discuss the rules that govern the use of XPath for the ListView filter in the RCDC.

  1. You can reference the object instance by using %Object% e.g. /Person[ObjectID=’%ObjectID%’]
  2. You can reference an attribute in the object instance by the use of %Attribute_attributeName% e.g. /Person[DisplayName = ‘%Attribute_DisplayName%’]. It must be a String attribute, you cannot use the %Attribute_referenceAttribute% to reference a reference attribute. So %Attribute_Target% is illegal.
  3. If you plan on using ObjectID as your filter reference then you have to use the %ObjectID% for a direct reference like what we have in (1). For instance since we know you cannot use %Attribute to reference a reference attribute, let’s say you store the Target Object in a string attribute you created called “TargetObject”, then you use [ObjectID = ‘%Attribute_TargetObject%’], it will not work. It’s illegal. You cannot point ObjectID to a string attribute.

Examples

So if you want to reference an object that is related to the item instance here is what you can do. In the RCDC for the example below we want to find a Group object based on an attribute (Attrib1) written to Object1 by a workflow.

  • Create a string attribute called Attrib1
  • Have the workflow write the Group DisplayName to Attrib1
  • ListFilter = /Group[DisplayName = ‘%Attribute_Attrib1%’]

Lets look at another example. In this case you want to find out the Users that are members of the Group

  • Listfilter = /Person[ObjectID = /Group[DisplayName = ‘%Attribute_Attrib1%’]/ExplicitMember

So while you cannot point ObjectID directly to a %Attribute (it does not allow %Attribute_referenceAttribute and you cannot point ObjectID to %Attribute_stringAttribute), you can directly point it to a reference result of an included XPath query.

Advertisements