Forum Post: DataMovementRuleLink ValueOverride does not work for RuleType = Text List

I am trying to create Visual Data Lineage Transformations and Data Movement Rules via Macros. The DataMovementRuleLink.ValueOverride does not work when the RuleType is Text. It works for other Rule Types. Am I defining the correct objects in the dim section? Pierre Option Explicit Sub main Dim diag As Diagram Dim dfs As DataFlows Dim df As DataFlow Dim tr As Transformation Dim dmrl As DataMovementRuleLink Debug.Clear Set diag = DiagramManager.ActiveDiagram Set dfs = diag.DataFlows Set df = diag.ActiveDataFlow Set tr = df.Transformations.Item(„Initial Load – Step 1”) ‚ Or any other transformation in dataflow For Each dmrl In tr.DataMovementRuleLinks Debug.Print „————————————–” Debug.Print „RuleName: ” + dmrl.RuleName Debug.Print „RuleType: ” + dmrl.RuleType If dmrl.RuleName = „Test” Then Debug.Print „Old Value: ” + dmrl.ValueCurrent dmrl.ValueOverride = „Text Updated by Macro” ‚ works fine Debug.Print „New Value: ” +dmrl.ValueCurrent ElseIf dmrl.RuleName = „test2” Then Debug.Print „Rule Text: „+ dmrl.RuleText Debug.Print „Old Value: ” + dmrl.ValueCurrent ‚ Returns 2 dmrl.ValueOverride = „3” ‚ Does not work , Also tried = „Option3”. Note: RuleText=1,*”Option1″,2,”Option2″,3,”Option3″ Debug.Print „New Value: ” +dmrl.ValueCurrent End If Next End Sub

GD Star Rating