Home

can functions call functions?

Patrick Naughton
Contributor

It doesn't seem like saved queries with function aliases can be called from within another saved query with a function alias...

 

Save the following query with a function alias of "lastperf"

Perf | top 10 by TimeGenerated desc

open up a new query and type

lastperf

and you'll get the 10 most recent Perf rows.

 

Now, save this query with a function alias of "funcfunc"

lastperf | summarize count() by Computer

Now try this:

funcfunc

 you'll get

'' operator: Failed to resolve table or column or scalar expression named 'lastperf'

 

if you change the body of funcfunc to call lastperf(), it will work if you run it, but then it will say:

 

Unknown function: 'lastperf'.

 

4 Replies
Highlighted

you're right. not intended. I'm reporting this behavior to engineering.

I'm running into a similar issue.

 

I've created a Computer Group called "WINDOWSNONPROD". I then created a 2nd computer group called "IISNONPROD" that has the following statement in it:

 

where Computer in (WINDOWSNONPROD)

 

When I reference the IISNONPROD group, I get the error: 'where' operator: Failed to resolve table or column or scalar expression named 'WINDOWSNONPROD'


Have you found out if it's simply not possible to call a function with another function?

Any update on this in the last four months?
Related Conversations