Forum Discussion
MarcusH
6 months agoValued Contributor
You cannot use a Composite Rule as that can only reference metadata members in the Rule Expression. You can look up metadata properties from a complex expression. This is an example that checks the value of Text1 on a UD2 member:
' Get the target UD2 member
Dim TargetU2 As String = args.GetTarget("U2#")
' Get the UD2 member id
Dim iUD2Id As Integer = BRApi.Finance.Members.GetMemberId(si, DimType.UD2.Id, TargetU2)
' Get the workflow cluster
Dim wfClusterPK As WorkflowUnitClusterPk = si.WorkflowClusterPk
' Get the scenario and time POV from the workflow
Dim iScenarioID As Integer = wfClusterPK.ScenarioKey
Dim iTimeID As Integer = wfClusterPK.TimeKey
' Get the Text1 property for the target UD2 member
Dim Text1 As String = BRApi.Finance.UD.Text(si, DimType.UD2.Id, iUD2Id, 1, iScenarioID, iTimeID)
Related Content
- 2 years ago
- 2 years ago
- 11 months ago