SOLVED

Query using Computer list from Parameter

%3CLINGO-SUB%20id%3D%22lingo-sub-2245032%22%20slang%3D%22en-US%22%3EQuery%20using%20Computer%20list%20from%20Parameter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2245032%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20have%20an%20issue%20with%20some%20code%20for%20a%20Workbook.%20I%20would%20like%20to%20run%20a%20Query%20in%20a%20Workbook%20and%20filter%20this%20on%20a%20list%20of%20computers%20that%20would%20be%20retrieved%20in%20a%20preceding%20parameter.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20parameter%20has%20the%20variable%20name%20%7BSuperComputerListPackageCode%7D.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20successfully%20run%20the%20%7BSuperComputerListPackageCode%7D%20query%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%221.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F268292iF642FC1388B89A50%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221.jpg%22%20alt%3D%221.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIts%20result%20is%3A%3C%2FP%3E%3CP%3E%5B%22Computer1.mydomain.com%22%2C%20%22Computer2.mydomain.com%22%2C%20%22Computer3.mydomain.com%22%2C%20%22Computer4.mydomain.com%22%2C%20%22Computer5.mydomain.com%22%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20stake%20is%20the%20following.%20In%20a%20subsequent%20request%2C%20I%20run%20the%20code%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EPerf%0A%7C%20where%20Computer%20in%20(%7BSuperComputerListPackageCode%7D)%0A%7C%20distinct%20Computer%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20the%20result%20gives%20me%20an%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F268293iAAA12A75038CC0A0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222.jpg%22%20alt%3D%222.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello,

I have an issue with some code for a Workbook. I would like to run a Query in a Workbook and filter this on a list of computers that would be retrieved in a preceding parameter.

 

This parameter has the variable name {SuperComputerListPackageCode}.

 

I can successfully run the {SuperComputerListPackageCode} query:

 

1.jpg

 

Its result is:

["Computer1.mydomain.com", "Computer2.mydomain.com", "Computer3.mydomain.com", "Computer4.mydomain.com", "Computer5.mydomain.com"]

 

My stake is the following. In a subsequent request, I run the code:

 

Perf
| where Computer in ({SuperComputerListPackageCode})
| distinct Computer

 

and the result gives me an error.

 

2.jpg

2 Replies
best response confirmed by SebasL (Occasional Contributor)
Solution
Change "text" parameter Type to "multi-value"
Wow. Ok. It worked the first time.

A big thank you!