CA Service Management

 View Only
  • 1.  Invalid constraint in stored query

    Posted Mar 15, 2016 09:40 AM

    Hi!

     

    In the query below I get an error message I don't quite understand. The query should return every incident which is assigned to you or any of your groups and which was not last modified by the assignee of the ticket. When saving, SDM throws the error below.

    "AHD05800:Bad where clause. invalid constraint. Check data types of referenced attributes"

    (assignee = @cnt.id OR group.[group]group_list.member IN (@cnt.id))

    AND active = 1

    AND last_mod_by != assignee

    AND type = \'I\'

    AND last_mod_by IS NOT NULL

    If I change "assignee" to "@cnt.id" in the highlighted line, I am able to save as usual.

    I have checked the technical reference which specify both as byte(16).

     

    Thankful for any responses!



  • 2.  Re: Invalid constraint in stored query

    Posted Mar 15, 2016 09:58 AM

    Hi, i think you will not be able to write such query, you can not compare values of two attributes



  • 3.  Re: Invalid constraint in stored query

    Posted Mar 15, 2016 10:01 AM

    But you can write trriger and spel code, that will set custom attribute to 1 or 0 depending who assignee or other person modified ticket, and use this attribute in your query.