Hi dbcase,
This is a tricky one, but I was able to get it working in a dashboard at least (Strange it's not working in Search though....)
Take a look at this dash board:
<form>
<label>rex based on drop down</label>
<fieldset submitButton="false">
<input type="dropdown" token="token">
<label>Select chan:</label>
<search>
<query>index=* source="Untitled.txt" host="indexer" sourcetype="mytest" | dedup chan | table chan</query>
<earliest>0</earliest>
<latest></latest>
</search>
<fieldForLabel>chan</fieldForLabel>
<fieldForValue>chan</fieldForValue>
</input>
</fieldset>
<row>
<panel>
<table>
<search>
<query>source="Untitled.txt" host="indexer" sourcetype="mytest" | fields chan e* | table * | rex max_match=0 "(?<myField>\w+c"$token$"):\s+(?<myValue>[^\s]+)" | fields - _raw | where chan=$token$ | table chan my* | eval zipped = mvzip(myField, myValue, "###") | mvexpand zipped | eval mv1 = replace(zipped, "###.*$", "") | eval mv2 = replace(zipped, "^.*###", "" ) | fields - zipped | eval {mv1}=mv2 | fields chan e* | stats max(*) AS *</query>
<earliest>@d</earliest>
<latest>now</latest>
</search>
<option name="wrap">true</option>
<option name="rowNumbers">false</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">cell</option>
<option name="count">10</option>
</table>
</panel>
</row>
</form>
This will get all chan values into a drop down and gets back the evagc* , emaxc* and eminc* values based on the value of chan .
If you have more questions let me know and we can look at this offline 😉
Hope this helps ...
cheers, MuS
PS: here are my test events based on your provided examples:
cpeId: 9c97261be426
messageType: zigBeeData
payload: { [-]
apsDecryptionFailures: 0
apsFrameCounterFailures: 0
apsRxBcast: 0
apsRxUcast: 355
apsTxBcast: 0
apsTxUcastFailures: 0
apsTxUcastRetries: 0
apsTxUcastSuccesses: 279
bufferAllocationFailures: 0
chan: 13
eavgc11: -56
eavgc12: -45
eavgc13: -42
eavgc14: -52
eavgc15: -66
eavgc16: -40
emaxc11: -56
emaxc12: -45
emaxc13: -42
emaxc14: -49
emaxc15: -31
emaxc16: -39
emaxc17: -33
eminc11: -56
eminc12: -45
eminc13: -42
eminc14: -52
eminc15: -72
eminc16: -41
cpeId: 9c97261be426
messageType: zigBeeData
payload: { [-]
apsDecryptionFailures: 0
apsFrameCounterFailures: 0
apsRxBcast: 0
apsRxUcast: 355
apsTxBcast: 0
apsTxUcastFailures: 0
apsTxUcastRetries: 0
apsTxUcastSuccesses: 279
bufferAllocationFailures: 0
chan: 14
eavgc11: -56
eavgc12: -45
eavgc13: -42
eavgc14: -52
eavgc15: -66
eavgc16: -40
emaxc11: -56
emaxc12: -45
emaxc13: -42
emaxc14: -49
emaxc15: -31
emaxc16: -39
emaxc17: -33
eminc11: -56
eminc12: -45
eminc13: -42
eminc14: -52
eminc15: -72
eminc16: -41
cpeId: 9c97261be426
messageType: zigBeeData
payload: { [-]
apsDecryptionFailures: 0
apsFrameCounterFailures: 0
apsRxBcast: 0
apsRxUcast: 355
apsTxBcast: 0
apsTxUcastFailures: 0
apsTxUcastRetries: 0
apsTxUcastSuccesses: 279
bufferAllocationFailures: 0
chan: 15
eavgc11: -56
eavgc12: -45
eavgc13: -42
eavgc14: -52
eavgc15: -66
eavgc16: -40
emaxc11: -56
emaxc12: -45
emaxc13: -42
emaxc14: -49
emaxc15: -31
emaxc16: -39
emaxc17: -33
eminc11: -56
eminc12: -45
eminc13: -42
eminc14: -52
eminc15: -72
eminc16: -41
... View more