cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

--queryDefinition= string sample

jdcc
1-Newbie

--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 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3
Maxim
1-Newbie
(To:jdcc)

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

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

thanks maxim and matt

Top Tags