Ticket Lister Filtering with function

Hello, I want to filter that only tickets are shown which delivery time is not over 60 mins, since this time is not saved into the database but only the {TICKET TAG:Delivery Minutes}, I calculated it out. Probably not the easiest way to do, but the result is always correct.

Now the question, in the ticket lister there is the filter field.
I put there

[=Math.floor((TN(FD(‘{TIME}’,‘HH’)) * 60 + TN(FD(‘{TIME}’,‘mm’)))-(TN(FD(‘{TICKET TIME}’,‘HH’)) * 60 + TN(FD(‘{TICKET TIME}’,‘mm’)) + {TICKET TAG:Delivery Minutes}) ) ]>60

I get this error: 2

Is it only a formatting error by me, or is it not possible to put functions in the filter field?

Try this ;

{ORDER STATE MINUTES:Status} < 60

Hello, this will not work for me because I sort the list with the orders which have to be accomplished first. In my scenario(gloriafood with preorder option), it is possible that orders which are accepted long time ago have to be finished later than fresh orders. It is not first in first out.

Here is the example of my situation. Sorting works well, but the filtering not.
{ORDER STATE MINUTES:Status} even isn’t interpreted right, but this doesn’t matter because it has to be the same value like {TICKET STATE MINUTES:Status} which is shown.
ordering

Am I using it the wrong way?

It’s correct. All your tickets are less than. 60 in fact they are all less than 0 even unless the negative sign is just a hyphen you hardcode.

You can’t use Order state there as it would need to open the ticket to read it.

These are negative numbers indeed. Order state I don’t need.
It is not working I get the erroe message from post #1 when I put this into filter…

Filter has specific syntax I can’t remember it off top of my head but it is not same syntax we normally use.