Forum Discussion

Whenderson's avatar
Whenderson
New Contributor
3 years ago

Member list from members delimited in a Text2 property line

Hi, 

I have a list of "segments" in the text 2 property for each Entity. For each Entity I would need to see these "segments" as columns in a cube view, so I need to return a "member list" however these "segments" are separated with a pipe ("|") delimiter in the text 2 property.

The above "segments" in the Text 2 line are already defined as UD2 members in the Dimensions section.

I was investigating the use of an XFBR formula however I can only return the first member list in the Text 2 property and not a list.

Any advise would be helpful.

Thanks

 

  • Do you just need to replace "|" with ","? You you don't know how to loop thru the delimited list?

    it's a vb for both. String.Replace ("old value","new value") and for the array you should go with array syntax:

     

    Dim arrValues As String() = text2.Split(New Char() {"|"c})

    Then loop thru it as For each val in arrValues...

  • db_pdx's avatar
    db_pdx
    Valued Contributor

    Hi Whenderson: something similar can be achieved using standard Member Filter .Where(TextN Contains Filter) capabilities.  However, you'll need to invert how you've done the tagging.

    In your UD2, Text2 field: add the entity names that correspond to the segments. Comma delimited or pipe delimited should both work.  You can now retrieve these members using a simple Member Filter as such:

    • U2#YourTopMemberOfTheDimension.DescendantsInclusive.Where(Text2 Contains HardCodedEntity)
    • U2#YourTopMemberOfTheDimension.DescendantsInclusive.Where(Text2 Contains |MFEntity|)
    • U2#YourTopMemberOfTheDimension.DescendantsInclusive.Where(Text2 Contains |CVEntity|)

    Similar example about usage in a dashboard: here

    Cheers,

    -DB