--- title: "Subsearch with variable expansion" slug: "subsearch-with-variable-expansion-1" tags: ["Helix Enterprise", "Reference", "Sec Ops and Analytics"] updated: 2026-09-09T16:29:16Z published: 2026-09-09T16:29:16Z canonical: "docs.trellix.com/subsearch-with-variable-expansion-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Subsearch with variable expansion You can also use subsearch in combination with variable expansion. For example: ```  IOC (dsthost:$exec_pc) ``` For this query, search first resolves the subsearch expression by doing a search for all the `dsthosts` that match the list `$exec_pc` and returns the result to add them as search terms in the main query. If the `exec_pc` list contains the hostnames `execcto` and `execcfo`, the following search is executed by the main query: ```  IOC dsthost:"execcto" OR IOC dsthost:"execcfo" ```