Topic
  • 1 reply
  • Latest Post - ‏2014-01-06T05:27:34Z by DonaldN
Karex
Karex
7 Posts

Pinned topic cqtool - new query for CURRENT_USER

‏2013-12-24T09:33:02Z |

Hello!

I have to make a new query that will have [CURRENT USER] in it, however when I do so:

new_query -eq State Resolved -and -eq Owner_List.Owner "[CURRENT_USER]" -field id -field headline "Personal Queries/query2"

I get an error:

cqcli error: An exception occured
({0})

How can I make in cqtool query for [CURRENT_USER]?

  • DonaldN
    DonaldN
    286 Posts

    Re: cqtool - new query for CURRENT_USER

    ‏2014-01-06T05:27:34Z  

    I suspect the exception is caused by "Owner_List.Owner", not [CURRENT_USER]. By the name itself, "Owner_List" looks to be a REFERENCE_LIST field. If it is true, then Owner_List.Owner is invalid.

    You can try the following to verify this.

    1. Remove the whole term -and -eq Owner_List.Owner "[CURRENT_USER]"

    2. Change the value to a constant: -eq Owner_List.Owner dummy_user

    3. Change the field to a single-value field such as Submitter (if exists): -eq Submitter "[CURRENT_USER]"

    Also, it may be for testing purpose only, but using [CURRENT_USER] in a query under "Personal Queries" does not make much difference than using an actual user name, since [CURRENT_USER] will always be the "current user" - you. In other words, you will have the same result if you hard code your user name there. Only when you put the query under "Public Queries", it will have the true meaning of "dynamic".