Skip to main content
1-Visitor
February 12, 2019
Solved

im issues --queryDefinitionFile returns "MKS124814:... Missing end )"

  • February 12, 2019
  • 2 replies
  • 3909 views

Hello,

I am trying to start a query with

im issues --queryDefinitionFile="C:/Temp/queryDef.txt"

queryDef.txt contains the query definition:

--queryDefinition=(("field[Document ID]=516733")and("item.live")and("item.meaningful"))

 

This returns the error "MKS124814: Cannot show view information: Missing end )"

I have tried a lot with leaving out "--queryDefinition=" and more and less ",(,), whatsoever. The definition is definitely correctly readable from the file, which I can see with the im issues -F option which returns the content of the queryDef.txt file as an error message (I just mention this to clarify that the path and name and everything is flawless)

 

 

I don´t see any error in the syntax. I can even use this query definition with directly typing

im issues --queryDefinition=(("field[Document ID]=516733")and("item.live")and("item.meaningful"))

and get the result that I am looking for. But of course there is little point in using the CLI if I not wanted to automize something.

 

 

Best answer by ascott

If you remove all of the double quotes, I think you'll find the command works as expected.

The brackets are used to separate the query conditions, so you only need double quotes to wrap the entire query def on the CLI.

So using --queryDefinitionFile

  • no quotes needed at all

Using --queryDefiniition your command would be:

  • im issues --queryDefinition="((field[Document ID]=516733)and(item.live)and(item.meaningful))"

I hope this helps!
-Andrew

2 replies

ascott17-PeridotAnswer
17-Peridot
February 14, 2019

If you remove all of the double quotes, I think you'll find the command works as expected.

The brackets are used to separate the query conditions, so you only need double quotes to wrap the entire query def on the CLI.

So using --queryDefinitionFile

  • no quotes needed at all

Using --queryDefiniition your command would be:

  • im issues --queryDefinition="((field[Document ID]=516733)and(item.live)and(item.meaningful))"

I hope this helps!
-Andrew

thorpend1-VisitorAuthor
1-Visitor
February 15, 2019

Hi ascott,

thanks a lot, the solution of my queryDefinitionFile problem is to leave out all quotes....That was maybe the only thing thing of a million things I didn´t try 🐵

Regards,

Thorsten

21-Topaz I
February 14, 2019

The query definition file should be a bit different. The problem is with the quotes around the item.live and item.meaningful conditions, though the field names can be quoted or unquoted within the file.

 

Try this line in the file and it should work:

((field[Document ID]=516733)and(item.live)and(item.meaningful))

 

thorpend1-VisitorAuthor
1-Visitor
February 15, 2019

thanks, this also works perfectly