see the docs about lookup
Note: The lookup command can accept multiple lookup and local fields and destfields. For example: lookup <lookup-table-name> <lookup-field1> AS <local-field1>, <lookup-field2> AS <local-field2> OUTPUTNEW <lookup-destfield1> AS <local-destfield1>, <lookup-destfield2> AS <local-destfield2>
the only thing you must be aware of, is that the
local-field should exists if you use it in a lookup. That would be in your use case
User and Country.
hope this helps ...
I'm not using inputlookup, the table is just called lookup.csv.
The inputfields are existing in the lookuptable and the event. It is an "and" combination of the inputfields, correct? So the lookup should work and add fieldA for an event, when this combination "User/Country" exists in the lookuptable as well.
let's take this example,
Configure this a lookup named
mylookup and you can use the lookup in a search like this:
basesearch | lookup mylookup col1 as field1, col2 as field2, col3 as field3 OUTPUT col4
For each event where all the input values matches, there will be a resulting field, col4, available for that event.
So if you have field1=100 AND field2=300 AND field3=500 then you will get back col4=yes
I wonder if it's possible to do "OR" logic, instead of "AND" logic?
Say, if I have field1=100 OR field2=300 OR field3=500 then I will get back col4=yes
To make an OR you just make multiple lookup with OUTPUTNEW instead of OUTPUT
my search | lookup mylookup col1 AS field1 OUTPUTNEW col4 | lookup mylookup col2 AS field1 OUTPUTNEW col4 | lookup mylookup col3 AS field1 OUTPUTNEW col4