Connector rule - drill back IF statement
Hi,
I am experiencing a strange behavior with a piece of code in the drill back of a connector rule.
I have the following piece of code:
If StageTableFields.StageSourceData.DimUD1.XFEqualsIgnoreCase("Zero") Then
whereClause.Append("And (Department IS NULL) ")
'Else
' whereClause.Append("And (Department = '" & SqlStringHelper.EscapeSqlString(sourceValues.Item(StageTableFields.StageSourceData.DimUD1).ToString) & "') ")
End If
When the ELSE condition is excluded as above the first IF works:

However, with the ELSE condition included (see code below) the retrieve from the Zero values does not work anymore:
If StageTableFields.StageSourceData.DimUD1.XFEqualsIgnoreCase("Zero") Then
whereClause.Append("And (Department IS NULL) ")
Else
whereClause.Append("And (Department = '" & SqlStringHelper.EscapeSqlString(sourceValues.Item(StageTableFields.StageSourceData.DimUD1).ToString) & "') ")
End If

Any idea why this is happening? Thank you
