Forum Discussion

BK's avatar
BK
New Contributor II
3 years ago

Syntax Text2 memberlist

I have two questions:

ud3 text2 has text which is the entity on where we are going to seed to.. 

1) I want a memberlist where Text2 is not blank or has no data. I am wondering if Text2 <> '' is the correct way to go?

2) What is the syntax of brapi or api.logmessage to see what is in the memberlist?

 

'Dim memberFilter_UD3 As String = "Cb#CONCUBE:U3#PCHEAD.Descendants.Where(Text2 DoesNotContain '')"

Dim memberFilter_UD3 As String = "Cb#CONCUBE:U3#PCHEAD.Descendants.Where(Text2 <> '')"
Dim UD3List As List(Of Memberinfo) = api.Members.GetMembersUsingFilter(api.Pov.UD3Dim.DimPk,memberFilter_UD3)

 

'api.logmessage("UD3List", String.Join(vbnewline, memberFilter_UD3.Select(Function(x) x.GetType.FullName)))

BRAPI.ErrorLog.LogMessage(si,"1_Target_ " & UD3List)

 

For each UD3 as Memberinfo in UD3List etc. etc.

BRAPI.ErrorLog.LogMessage(si,"Test " & UD3.NameAndDescription)' &" " & UD3.Properties.GetUDProperties.Text2.GetValue())

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    When in doubt, search in the Design And Reference Guide for the section "Member Expansion Where Clause". There we find the following:

    A#Root.Children(Text5 <> '') filters out the Members that have an empty value for the Text5 property.

    I suspect the issue you might have is that Text properties vary by Scenario type and by Time, and GetMembersUsingFilter has no way to specify those, so maybe you can't use that type of filter with that call. In that case you might have to do it yourself by removing the clause, retrieving a more generic list of MemberInfo objects, then looping through the list calling their GetMemberInfoForProperty() method with the necessary parameters to look up that property.