The case function seems to finding the first true statement and displays that value. Is there another function or different way to use case to get the results i want below? There are different events with similar features below, want something that would use for all different scenarios of when something is true or false.
Event Fields i am filtering on:
vpn=true
proxy=false
tor=true
What im using:
| eval anon= case(vpn="true", "vpn" , proxy="true", "proxy", tor="true", "tor")
results im getting:
anon=vpn
results i want:
anon=vpn
tor
thanks for any help!
| makeresults
| eval vpn="true"
| eval proxy="false"
| eval tor="true"
| foreach vpn proxy tor
[| eval anon=if(<<FIELD>>="true",if(isnull(anon),"<<FIELD>>",mvappend(anon,"<<FIELD>>")),anon)]
| makeresults
| eval vpn="true"
| eval proxy="false"
| eval tor="true"
| foreach vpn proxy tor
[| eval anon=if(<<FIELD>>="true",if(isnull(anon),"<<FIELD>>",mvappend(anon,"<<FIELD>>")),anon)]
Thanks! Gonna have to apply this knowledge to other queries now