I figured out a solution:
<input type="dropdown" token="IOC_fields" searchWhenChanged="true">
<label>Field to Search</label>
<fieldForLabel>token_type</fieldForLabel>
<fieldForValue>search_param</fieldForValue>
<search>
<query>| makeresults | eval token="$IOC$" | eval token_type=if(match(token, "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"), "IP", "URL") | eval search_param=if(match(token, "IP"), "src=".token, "url=".token) | table token, token_type, search_param</query>
</search>
</input>
It will take the token IOC, qualify it as an IP, or URL, and then will use concatenate to form correct search language with the token.
... View more