Skip to main content
Newcomer
July 20, 2023

Create custom member filter - Tree

  • July 20, 2023
  • 1 reply
  • 0 views

As we cannot filter the Tree member expansion, is it possible to create a custom Tree?

If not as a custom expansion, perhaps a code that returns a tree i.e. XFTreeItem?

Dimension:

Account

Parent1

    + Member1

    + Member2

        +Member2.1

            +Member2.1.1

            +Member2.1.2

        +Member2.2

            +Member2.2.1

 

In the above account dimension, I dont want Member 2.2. I just want the ultimate Parent1, the next level (Member1, Member2), and all base members. 

The result would be something like:

 

Parent1

    + Member1

    + Member2

            +Member2.1.1

            +Member2.1.2

            +Member2.2.1

 

Thx

 

1 reply

OneStream Employee
July 20, 2023

Have a look at the .Remove and .List functions in Member Filter Builder, the Samples tab has examples.

If that is not enough, you want to build a Custom Member List. Search in the documentation help for "Finance Function Types" (including double-quotes), pick the first result, then look at the section titled "Member List and Member List Headers", it has example code. You can also look at the Finance Business Rules provided by Standard Reports, there are a few called XFR_MemberList* that provide some practical examples.

Newcomer
July 20, 2023

Hi Jack,

.Remove and .List do not work in my case, as I would need to know the member name.

The MemberList method works (we use some of them), however, I don't get a Tree style. I wanted to have the same effect as the member.Tree

I managed to present using Top.ChildrenInclusiveR.Base, so I skip some parents after the first level of parents.

Would be nice to have functions to select members by either Generation or Levels.

OneStream Employee
July 20, 2023

RafMarques wrote:

Hi Jack,

.Remove and .List do not work in my case, as I would need to know the member name.

No you don't, you can get that by nesting another expansion. I can't test it but IIRC something like this should work: E#Parent1.TreeDescendantsInclusive.Remove(E#Parent1.TreeDescendants.Where(HasChildren = True).Last)

I agree that we could do with slightly better control of lists though.