Forum Discussion

abon13's avatar
abon13
Brass Contributor
Oct 07, 2022
Solved

Watchlist file name as a function parameter

Hi, I am writing a main function that calls out sub functions as per IoC's stored in the watchlist.  Currently I have the watchlist file name in every sub-functions and was hoping if I can avoid thes...
  • Clive_Watson's avatar
    Clive_Watson
    Oct 10, 2022

    abon13 

     

    So for example, I have a Watchlist with 7 rows of IP Addresses.  I use materialize to cache the data with a let() to the name wList

    let wList = materialize ( _GetWatchlist('ipa') );
    union 
    (
    wList
    | where SearchKey !startswith "188"
    | count
    ),
    (
    wList
    | where SearchKey startswith "188"
    | count
    )

    As you can see (in this very brief example) I call wList twice but ask for different data each time  

     

Resources