Skip to main content
1-Visitor
Feb 19, 2013 8:55 AM UTC
Solved

--queryDefinition= string sample

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

    1-Visitor
    Feb 19, 2013 5:42 PM UTC

    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

    3 replies

    1-Visitor
    Feb 19, 2013 2:41 PM UTC

    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

    Translate
    1-Visitor
    Feb 19, 2013 5:42 PM UTC

    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

    Translate
    jdcc1-VisitorAuthor
    1-Visitor
    Feb 20, 2013 4:26 AM UTC

    thanks maxim and matt

    Translate