Skip to main content
1-Visitor
February 19, 2013
Solved

--queryDefinition= string sample

  • February 19, 2013
  • 1 reply
  • 3004 views

Hi all,

I am new here and i need help on how to use createquery via CLI. Can you please provide a sample of string for --queryDefinition option in commandline.

This is what I have that don't work.

im.exe createquery --name=Test --queryDefinition=((field["Project title"] = "9497") and (field["State"] = "Open") and (field["Created By"] = "jc185178","mp185138","ms185250","rv185054"))

Is there something wrong with the queryDefinition string?

Thanks,

Jd

    Best answer by matt_giltaji

    Hi jdcc.

    You will also want to make sure that the quotes around the overall definition are not the same as the quotes around the field names in the definition, as this has caused problems for me on Windows 7 and Windows Vista.

    --queryDefinition='((field["Project title"] = "9497") and (field["State"] = "Open") and (field["Created By"] = "jc185178","mp185138","ms185250","rv185054"))'

    Also if you have any shortext or longtext fields, you should use contains rather than =, for example

    (field["Summary"] contains "xyz") instead of (field["Summary"] = "xyz") otherwise the command will return with an error message.

    Matt

    1 reply

    1-Visitor
    February 19, 2013

    Hi jdcc,

    try it with quotes around your Defintion:

    --queryDefinition="((field["Project title"] = "9497") and (field["State"] = "Open") and (field["Created By"] = "jc185178","mp185138","ms185250","rv185054"))"

    Kind regards,

    Maxim

    1-Visitor
    February 19, 2013

    Hi jdcc.

    You will also want to make sure that the quotes around the overall definition are not the same as the quotes around the field names in the definition, as this has caused problems for me on Windows 7 and Windows Vista.

    --queryDefinition='((field["Project title"] = "9497") and (field["State"] = "Open") and (field["Created By"] = "jc185178","mp185138","ms185250","rv185054"))'

    Also if you have any shortext or longtext fields, you should use contains rather than =, for example

    (field["Summary"] contains "xyz") instead of (field["Summary"] = "xyz") otherwise the command will return with an error message.

    Matt

    jdcc1-VisitorAuthor
    1-Visitor
    February 20, 2013

    thanks maxim and matt