Negation in report expressions

Hi Sambapos community,

With {REPORT TICKET DETAILS:< fields >:< expression >} I can use an expression like for example (TT.SOMETAG=SOMEVALUE) ; Is there a way to write the negation, something like (T.SOMETAG!=SOMEVALUE) ?

By the way the syntax is very strict, leaving spaces like this (TT.SOMETAG = SOMEVALUE) makes it fail.

Thanks!

Correct and that probably wont change.

If you filter it to a specific Ticket Tag then that means it will negate all other tags unless it matches the one you used an expression for. If you want to include multiple tags then use OR for example:
(TT.SOMETAG=SOMEVALUE) OR (TT.SOMETAG=SOMEVALUE) OR (TT.SOMETAG=SOMEVALUE)

If you want it to match all of something you can do (TT.SOMETAG=SOMEVALUE) AND (TT.SOMETAG=SOMEVALUE)

If you can provide an example of what your wanting to do it might help us find a better solution for you. Instead of discussing the report feature lets discuss your actual problem your trying to solve.

Thanks for your reply @Jesse. Okay so here is the example. Every ticket gets a customer satisfaction rate from 1 to 10 using a ticket tag. In my report I’d like to match all the tickets that have a value different then 10 without having to write (TT.SATISFACTION=1) OR (TT.SATISFACTION=2) … OR (TT.SATISFACTION=9)

You could use parameters like @1,2,3,4,5,6,7,8,9

Then in report use (TT.Satisfaction=$1)

Put @1,2,3,4,5,6,7,8,9 after [report:1,1,2] area.

[report:1,2]
@1,2,3,4,5,6,7,8,9
{REPORT TICKET BLAH:t.blah,t.blah:(TT.Satisfaction=$1)}

1 Like

working, thank you ! extra question : how to match tickets were the satisfaction value is not set (ie where the value is null or empty string or whatever sambapos uses to represent something that hasn’t been set yet) ?