Home

can functions call functions?

%3CLINGO-SUB%20id%3D%22lingo-sub-263139%22%20slang%3D%22en-US%22%3Ecan%20functions%20call%20functions%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-263139%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20doesn't%20seem%20like%20saved%20queries%20with%20function%20aliases%20can%20be%20called%20from%20within%20another%20saved%20query%20with%20a%20function%20alias...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESave%20the%20following%20query%20with%20a%20function%20alias%20of%20%22lastperf%22%3C%2FP%3E%3CPRE%3EPerf%20%7C%20top%2010%20by%20TimeGenerated%20desc%3C%2FPRE%3E%3CP%3Eopen%20up%20a%20new%20query%20and%20type%3C%2FP%3E%3CPRE%3Elastperf%3C%2FPRE%3E%3CP%3Eand%20you'll%20get%20the%2010%20most%20recent%20Perf%20rows.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%2C%20save%20this%20query%20with%20a%20function%20alias%20of%20%22funcfunc%22%3C%2FP%3E%3CPRE%3Elastperf%20%7C%20summarize%20count()%20by%20Computer%3C%2FPRE%3E%3CP%3ENow%20try%20this%3A%3C%2FP%3E%3CPRE%3Efuncfunc%3C%2FPRE%3E%3CP%3E%26nbsp%3Byou'll%20get%3C%2FP%3E%3CPRE%3E%3CSPAN%3E''%20operator%3A%20Failed%20to%20resolve%20table%20or%20column%20or%20scalar%20expression%20named%20'lastperf'%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Eif%20you%20change%20the%20body%20of%20funcfunc%20to%20call%20lastperf()%2C%20it%20will%20work%20if%20you%20run%20it%2C%20but%20then%20it%20will%20say%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CSPAN%3EUnknown%20function%3A%20'lastperf'.%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-263139%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338458%22%20slang%3D%22en-US%22%3ERe%3A%20can%20functions%20call%20functions%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338458%22%20slang%3D%22en-US%22%3E%3CP%3Ecc%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F98398%22%20target%3D%22_blank%22%3E%40Oleg%20Ananiev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-335273%22%20slang%3D%22en-US%22%3ERe%3A%20can%20functions%20call%20functions%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-335273%22%20slang%3D%22en-US%22%3EAny%20update%20on%20this%20in%20the%20last%20four%20months%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-325837%22%20slang%3D%22en-US%22%3ERe%3A%20can%20functions%20call%20functions%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-325837%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20running%20into%20a%20similar%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20created%20a%20Computer%20Group%20called%20%22WINDOWSNONPROD%22.%20I%20then%20created%20a%202nd%20computer%20group%20called%20%22IISNONPROD%22%20that%20has%20the%20following%20statement%20in%20it%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3Ewhere%20Computer%20in%20(WINDOWSNONPROD)%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20reference%20the%20%3CSTRONG%3EIISNONPROD%3C%2FSTRONG%3E%20group%2C%20I%20get%20the%20error%3A%26nbsp%3B%3CSPAN%3E'where'%20operator%3A%20Failed%20to%20resolve%20table%20or%20column%20or%20scalar%20expression%20named%20'%3CSTRONG%3EWINDOWSNONPROD%3C%2FSTRONG%3E'%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EHave%20you%20found%20out%20if%20it's%20simply%20not%20possible%20to%20call%20a%20function%20with%20another%20function%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-268279%22%20slang%3D%22en-US%22%3ERe%3A%20can%20functions%20call%20functions%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-268279%22%20slang%3D%22en-US%22%3E%3CP%3Eyou're%20right.%20not%20intended.%20I'm%20reporting%20this%20behavior%20to%20engineering.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-920430%22%20slang%3D%22en-US%22%3ERe%3A%20can%20functions%20call%20functions%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-920430%22%20slang%3D%22en-US%22%3ENow%20they%20can...%20took%20us%20some%20time%20but%20finally%20here%3C%2FLINGO-BODY%3E
Highlighted
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'.

 

5 Replies

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?
Now they can... took us some time but finally here
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies