fc
11 hours agoContributor
Use 2 fields to determine dimension value in datasource
Hi all,
I need to set up a complex expression to assign a specific value to the U6 dimension based on 2 source fields. Below part of the list of those source fields.
The code I set up for the complex expression is the following:
Dim fields As List(Of String) = api.Parser.DelimitedParsedValues()
Brapi.ErrorLog.LogMessage(si, "Field count (List.Count): " & fields.Count)
If fields.Count > 4 Then
Dim loadedAccount As String = fields(4)
Brapi.ErrorLog.LogMessage(si, "loadedAccount: '" & loadedAccount & "'")
If Left(loadedAccount, 2) = "00" Then
Return Right(loadedAccount, 8)
End If
Else
Brapi.ErrorLog.LogMessage(si, "WARNING: only " & fields.Count & " fields; skipping Account logic")
End If
Every time I launch the loading process, however, it prints the WARNING message for all the rows, as if it didn't find any source field.
Am I doing something wrong / is there an alternative way to retrieve the fields values that I am not considering?
Thank you for the help!