Constraint for open ticket

I need a couple of constraints, here is what I tried.

This is for Action Constraints

If there are open tickets: '{TICKET STATE:Status}' != ''
If there are not open tickets: '{TICKET STATE:Status}' == ''

And If I was to create a line where I’m wanting to insert the number of open tickets? obviously it wont be: There are {TICKET STATE:Status} Open Tickets ?

Sorry, ive tried but failed

Matt

I would think ‘{TICKET STATE:Status}’ != Paid’’ would interprit into, if Ticket state:Status does not equal Paid, the ticket is open. ELSE
‘{TICKET STATE:Status}’ == ‘Paid’ then it would be interpreted as If Ticket State: Status equal Paid, then ticket is closed.

That’s as far as i got.
So try putting Paid next to != and == and see if that works?

It needs for be all tickets not for one, example…

I’m creating a management button on the ticket screen which will give a popup to different management functions. One being End Work Period. I can get as far as it saying ‘Workperiod already closed’ and ‘are you sure you want to run work period’ but I’m making a message under that action with a constraint that if there are tickets open ‘ENDING WORK PERIOD FAILED’… because the action wouldn’t work anyway if there are tickets…

but I want a message under THAT that says ‘Work period End Success’ that will only show if there are no open tickets.

If u get me

Where? What are you trying to do, really?

What? Create a line where?

Look above :smiley:

I was writing a wall of text with no punctuation

Basically it all works fine…

just the wrong messages pop up. Tells me I’m a failure when I’m quite obviously not

Here is the “important” bit:

TN('{REPORT TICKET COUNT:(TS.Status=Unpaid)}')>0

That ^ is used on this button which is on a Custom Workperiod Screen:

Entire Caption code for the button:

[='{SETTING:ISCURRENTWORKPERIODOPEN}'=='TRUE' ? '<panel Green>' : '<panel Red>']WorkPeriod is<linebreak/><b>[=('{SETTING:ISCURRENTWORKPERIODOPEN}'=='TRUE' ? 'OPEN' : 'CLOSED')]</b><linebreak/><linebreak/>[=TN('{REPORT TICKET COUNT:(TS.Status=Unpaid)}')>0 ? 'Cannot Close Workperiod with ' + TN('{REPORT TICKET COUNT:(TS.Status=Unpaid)}') + ' Open Tickets<linebreak/><linebreak/>Click here to see Open Tickets' : 'Click here to ' + ('{SETTING:ISCURRENTWORKPERIODOPEN}'=='TRUE' ? 'Close' : 'Open') + ' the WorkPeriod']</panel>
3 Likes

thanks, you star!

Will implement either when back from pub later or tomorrow.

probably tomorrow as I dunno if ill see the screen later.

Matt

2 Likes

all working brill thanks. Used <1 for the constrasint to work if there are no open tickets.

1 question, ‘click here to see open tickets’ are you literally pointing them to the tickets screen? or is there a way you can make it took at just open tickets?

Matt

Licket screen/list defaults to todays open tickets anyway doesnt it?

no? not that I knew of?

I thought it just stayed on what was last used

Arr yer your right, just we shut down at night, restarting samba defaults it to today open tickets.
You could use display ticket list action and filter by states I expect…

1 Like

Created a new entity screen with ticket lister, but the entity screen won’t open unless I have something selected on the pos?

No, there is an action

Which shows like this;

2 Likes

thats awesome! Thanks

so that gives me a new direction to list Paid tickets…

any way to change the order listed so that latest at the top?

No, you can see the action options.
It will be ordered by ticket number i guess.

that’s poo, would be nice if we could sort order?

I’m gonna request :smiley:

Wouldnt the entity screen ticket lister be more appropriate for that? had filter and sort options.