Montreux
26 days agoNew Contributor III
Substitution Variables with Desc and User Culture
Hi, It doesn't look like the cube view ":name" override using substitution variables respects the user's culture setting. The substitution variable goes instead to the default description. My exam...
- 25 days ago
Yeah, that's just how it works for all "Desc" variables (MF, CV, POV). You're not wrong that it would likely be more elegant to translate them as necessary - although it would introduce a slight inconsistency, since other variables are not affected by Culture.
You can submit an Ideastream post and see where it goes. In the meantime, the workaround (as it's often the case) is to use an XFBR rule:
If args.FunctionName.XFEqualsIgnoreCase("i18n") Then ' get our dimension type Dim dimTypeStr = args.NameValuePairs.XFGetValue("dimtype", "A") Dim myDimType = DimType.GetItemFromAbbreviation(dimTypeStr, False, False, False) ' set option to get our translated strings Dim memOpt As New MemberDisplayOptions() With { .IncludeAllDescriptions = True } ' retrieve member info Dim memInfo = brapi.Finance.Members.GetMemberInfo(si, myDimType.id, DimConstants.Unknown, args.NameValuePairs.XFGetValue("name", "Root"), False, Nothing, memOpt) ' look up the translated description using the user's culture and return it. ' If not present, use default description. Return memInfo.Descriptions.XFGetValue(si.Culture, New MemberDescription()).Description End If
You'd then specify it in your Cube View like this: