Hallo,
i cannot seem to get the following to work: I want to add a child to a repeating node, that itself is part of repeating node.
my:form
my:people
my:person (repeating)
my:ActiveDirectoryFields
my:propertyData (repeating) (add new node here for a certain person-node)
I tried the following Command for Qrules:
Insert /parent=/my:form/my:people/my:person[my:UserName=current()/../my:UserName]/my:ActiveDirectoryFields /child=my:PropertyData
Qrules throws this message:
An unexpected error occurred executing the rule. Action: Insert
Arguments:
parent: /my:UserDataChangeRequest/my:people/my:person[my:UserName=current()/../my:UserName]/my:ActiveDirectoryFields
child: my:PropertyData
Details: XsltContext is needed for this query because of an unknown function.
Stack: at MS.Internal.Xml.XPath.CompiledXpathExpr.UndefinedXsltContext.ResolveFunction(String prefix, String name, XPathResultType[] ArgTypes)
at MS.Internal.Xml.XPath.FunctionQuery.SetXsltContext(XsltContext context)
at MS.Internal.Xml.XPath.BaseAxisQuery.SetXsltContext(XsltContext context)
at MS.Internal.Xml.XPath.BaseAxisQuery.SetXsltContext(XsltContext context)
at MS.Internal.Xml.XPath.LogicalExpr.SetXsltContext(XsltContext context)
at MS.Internal.Xml.XPath.FilterQuery.SetXsltContext(XsltContext input)
at MS.Internal.Xml.XPath.BaseAxisQuery.SetXsltContext(XsltContext context)
at MS.Internal.Xml.XPath.CompiledXpathExpr.SetContext(XmlNamespaceManager nsManager)
at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
at System.Xml.XPath.XPathNavigator.SelectSingleNode(String xpath, IXmlNamespaceResolver resolver)
at Qdabra.Tools.RulesLibrary.Commands.GetValidNode(XPathNavigator dom, String xpath, String errorMessage)
at Qdabra.Tools.RulesLibrary.Commands.Insert()
at Qdabra.Tools.RulesLibrary.Commands.ExecuteCommand()
Do you know, if this is at all supported?
I also tried to just hardcode the query but to no avail:
Insert /parent=/my:UserDataChangeRequest/my:people/my:person[my:UserName = "abc"]/my:ActiveDirectoryFields /child=my:PropertyData
Then I get this message:
An error has occurred executing the rule. Failed to select the child node.
Can you help me please?
Thank you
Michel