Forum Discussion
hi BSK,
This is for a UD2 memberlist:
api.Members.GetBaseMembers(api.Pov.UD2Dim.DimPk, api.Members.GetMemberId(dimtype.UD2.Id, "Top_Gaap_SY"))
- BSK3 years agoNew Contributor III
Thanks Andreas.
I have difined this as below and looping into For loop, But getting the error as "1) Error at line 44: Value of type 'Member' cannot be converted to 'String'." or " Value of type 'String' cannot be converted to 'DimPk'."
----
Dim U3Filter As List(Of Member) = api.Members.GetBaseMembers(api.Pov.UD3Dim.DimPk, api.Members.GetMemberId(dimtype.UD3.Id, "TopUD3"))
For Each UD2 As String In U3Filter
----
- JackLacava3 years agoCommunity Manager
A Member object is not a String object. You loop on the objects, and use properties out of them. Example:
Dim U3Filter As List(Of Member) = api.Members.GetBaseMembers( _ api.Pov.UD3Dim.DimPk, api.Members.GetMemberId(dimtype.UD3.Id, "TopUD3")) For Each memberObj In U3Filter ' memberObj.Name is an actual String BRApi.ErrorLog.LogMessage(si, memberObj.Name) next
(Btw, looping on lists of members should not be done in member formulas or calculation rules; ideally you want to use DataBuffers with filters and Formula Variables. I strongly recommend picking up the OneStream Finance Rules and Calculations Handbook to find out how and why.)
- BSK3 years agoNew Contributor III
Thanks jack, I have already got the book, In progress of reading.
Related Content
- 8 months ago
- 2 years ago