VB - proper format for this IF statement Follow

1
Avatar
Brian Susol

Till today, I have gotten away with having a Single Line Expression for my "SetTrack" field. 

The expression was simply:

Format.NamedSubStrings("PMSetID").Value & " " & Format.NamedSubStrings("SetID").Value & "/" & Format.NamedSubStrings("TrackID")

 

However, I am now in need of making an adjustment.  It PMSetID and SetID are the same, Id like to continue down that path, but if different, id like to make an adjustment.  I cant quite figure out the format here. I have the following, any thoughts would be appreciated.

PM = Format.NamedSubStrings("PMSetID").Value
SET = Format.NamedSubStrings("SetID").Value

If PM = SET
Format.NamedSubStrings("PMSetID").Value & " " & Format.NamedSubStrings("SetID").Value & "/" & Format.NamedSubStrings("TrackID")

Else
Format.NamedSubStrings("PMSetID").Value & " " & Format.NamedSubStrings("TrackID")

end if

 

2 comments

0
Avatar
Brian Susol
Comment actions Permalink

In case anyone else finds it helpful, I believe I have it working

 

PM = Format.NamedSubStrings("PMSetID").Value
SET_ID = Format.NamedSubStrings("SetID").Value

If PM = SET_ID Then
Value = Format.NamedSubStrings("PMSetID").Value & " " & Format.NamedSubStrings("TrackID")
Else
Value = Format.NamedSubStrings("PMSetID").Value & " " & Format.NamedSubStrings("SetID").Value & "/" & Format.NamedSubStrings("TrackID")
End If

0
Avatar
Xabier Clemente
Moderator
Comment actions Permalink

Hi Brian!

Welcome to the BarTender Community!

Thank you for sharing with us the solution you found for this issue! People with the same query will surely find it useful. :)

Please sign in to leave a comment.