Hi Neil,
the simplest solution to your problem is to define field extraction for iis sourcetype at indexing time, by editing your app's props.conf file.
In your $SPLUNK_HOME/etc/system/default you will also find Splunk props.conf which contains field extraction for Apache access_combined logs, that are very similar to IIS ones. You can take a glance there and provide your custom field extraction under $SPLUNK_HOME/etc/system/local or under your IIS app home folder (should be something like $SPLUNK_HOME/etc/apps/iis).
Remember to specify the sourcetype name in props.conf stanza (for example [iis]) and assign, in inputs.conf, the same sourcetype, so that when gathered, that logs will automatically be parsed to extract the fields you wanted.
At this point, your subsearch should become way simpler.
Please refer to Splunk Docs for more information on subsearches.
Regards,
Stefano
... View more