Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleBuild a custom configuration

See Custom Fields - We can add Client ID List ClientList which will be a comma delimited list of the prefixes we want to filter on:

Image RemovedImage Added

Expand
titleWe need to modify the matching algorithm - what do we start with?

The file reader component is deliberately simple and uses /wiki/spaces/IXB/pages/3181903910 to make it more obvious how to modify the code to meet new needs. So this is what we are starting off with. We need this function to return true when the matching criteria are met.

https://bitbucket.org/interfaceware/fromfile/src/main/MatchRules.lua

Code Block
function MatchFile(FileName)
   return true
end
Expand
titleStart the new MatchFile logic with getting the list of prefixes and removing white space

We’ll apply /wiki/spaces/IXB/pages/3181903910 and write this as a function:

Code Block
function APPidList()
   local IdList = component.fields()["Client Id ListClientList"]
   IdList = IdList:split(",")
   for i = 1, #IdList do
      IdList[i] = IdList[i]:trimWS()
   end
end

function MatchFile(FileName)
   local IdList = APPidList();
   return true
end

These are the concepts we have used:

...