CA Service Management

  • 1.  Scoreboard query - result of two integers added

    Posted Jun 26, 2017 01:05 PM

    I am attempting to create a scoreboard query that will display tickets based off of two custom integer fields that are added together. When I attempt to add the two integers within the scoreboard, I receive the error: "Bad where clause. invalid constraint. Could not recognize int1+int2."

     

    This is an example of a query that I am attempting to create:

    active=1 AND (int1 + int2 > 2)

     

    Is this type of query possible to be added as a Scoreboard query within Service Desk?



  • 2.  Re: Scoreboard query - result of two integers added
    Best Answer

    Posted Jun 26, 2017 02:18 PM

    Hi,

    sad thing but scoreboard queries doesn't support math. There is special type of filed called DERIVED field which have possibility to concatenate strings but I'm not sure about operations with digits. To make it possible, you could vote up for idea to extend DERIVED attributes: Extend DERIVED attribute 

     

    Regarding to your scenario, as a workaround without publish new attribute, you can define query in this way:

    (active = 1) AND ( (int2 >= 2) OR (int1 >= 1 AND int2 >= 1) OR (int1 >= 2) )

    other way is to publish new attribute which will store sum of these fields and will recalculate it on change.

     

    Regards,

    cdtj



  • 3.  Re: Scoreboard query - result of two integers added

    Broadcom Employee
    Posted Jun 26, 2017 02:57 PM

    the query will give (int1 + int2 >=2)...to give "int1 + int2 > 2" you would need

    (active = 1) AND ( (int2 >3 ) OR (int1 >= 1 AND int2 > 2) OR (int1 >= 2 AND int2 > 1) OR (int1 > 3)  )

    glad that it is 2 not 20. In that case, cdtj's suggestion to have an additional field to hold the sum of

    these 2 should be a better idea.