| foreach V* [eval PAC<<MATCHSTR>>=<<FIELD>>-Voice],
| foreach PAC* [eval <<FIELD>>=if(<<FIELD>> < 0, -<<FIELD>>, 0)]
error -> Error in 'foreach' command: Only the last argument should be a search pipeline
I can find 3 issues in above query.
,
in your first line end. That's is wrong-voice
should be concatenated to field using . "
(dot and double quotes) to make it a string.Please find corrected query
|makeresults | eval total=0| eval VariableA="100"| eval VariableB="200"
| foreach V* [eval PAC_<<MATCHSTR>>=<<FIELD>> . "-voice" ]
| foreach PAC* [eval <<FIELD>>=if(<<FIELD>> < 0, -<<FIELD>>, 0)]
Hi nkankur,
I see an odd "," at the end of the first foreach statement... sure this needs to be there?