You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Unable to find the nearest ancestor to the current node given the node type

Received Response
10
Views
1
Comments
edited Aug 16, 2021 2:56PM in Enterprise Data Management 1 comment

Content

Following steps...
 
In EDMCS I have a View with a  hierarchy viewpoint.
Select a leaf node, then select the "Source Mapping" property, and then select "Show Property detail",
Expand application node Types
Under "Default Parameters", the "The default Type" is set to "Derived" with the following expression...
 
{
    return node.ancestors.find(ancestorNode =>
ancestorNode.nodeType.name.equals("cMAS_SRC_FGLPosting_NodeType")).name
}
 
We need to find the nearest ancestor with a given node type.
 
Currently the expression returns the top most node in the hierarchy that matches the filter and not the node nearest to the current node from which we are searching. How do we find the closest ancestor that matches the filter?

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!