Skip to content

Best option for a filter of field = field in a record? #7960

Answered by canob
canob asked this question in Q&A
Discussion options

You must be logged in to vote

Finally I found a way. With this LUA Filter I created a field with the content "match" or "nomatch", based on compare the ServiceName with the TargetUserName (without @Domain), and after that, I can create a rewrite_tag filter based on that new field to route my message:

function string:split( inSplitPattern, outResults )
  if not outResults then
    outResults = { }
  end
  local theStart = 1
  local theSplitStart, theSplitEnd = string.find( self, inSplitPattern, theStart )
  while theSplitStart do
    table.insert( outResults, string.sub( self, theStart, theSplitStart-1 ) )
    theStart = theSplitEnd + 1
    theSplitStart, theSplitEnd = string.find( self, inSplitPattern, theStart )
  en…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by patrick-stephens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant