The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
MarcusH
3 years agoValued Contributor
Get member description in user's culture code
Does anyone know how to get the member description in the user's culture code?
- 3 years ago
ok, you can access the descriptions with the memberinfo object:
Dim MemberIdOfAccount As Integer = BRApi.Finance.Members.GetMemberId(si, DimTypeId.Account, "41010") Dim test As MemberInfo = BRApi.Finance.Members.GetMemberInfo(si, DimTypeId.Account, MemberIdOfAccount,,,New MemberDisplayOptions(True,"en-US",True,False,False,False,False,0)) BRApi.ErrorLog.LogMessage(si, test.Descriptions("en-US").Description & " " & test.Descriptions("fr-FR").Description)
JackLacava
OneStream Employee
3 years agoBRApi.Finance.Members.ReadMemberDescriptionsNoCache(si, dimTypeId, memberId) should give you all the descriptions, then you can loop through them. Each MemberDescription has a MemberDescriptionPK with a property for the language, i think.
MarcusH
3 years agoValued Contributor
ReadMemberDescriptionNoCache returns the list of aliases for the member (I've just tested it). If the member does not have an alias for a particular language it does not return anything. MemberDisplayOptions on the other hand returns the alias if it exists and the default value if there is no alias for the member which is what I want. Thank you for your time Jack. I will keep this in my little Rules bank.
- ChristianW3 years ago
OneStream Employee
Markus, you can use Jack's suggestion as well, I tested it and added a sample.
- MarcusH3 years agoValued Contributor
An hour ago I didn't know how to do it. Now I don't know which piece of code to use! Thank you Christian.
- ChristianW3 years ago
OneStream Employee
In the second sample the default is null and without a description it will create an error. You can code around it, but the first solution seams to be less complicated.