Result (note I altered script slightly than from above - I have <br/> before the function call now and removed it from the function as I think it looked better):
İ am using this for button. {REPORT TICKET DETAILS:T.User:(TEN.Tables=$1) and T.RemainingAmount>0:-}.
But this make my computer slow. Can use ts.status?
How many entities? Think emre improved the report structure but this type of expression on entity button will be demanding on system as it will have to check all tickets in a loop for each entity displayed.
You would be better to update an entity level value - say a entity state of user and update on ticket entity changed even or something like that.
{ENTITY STATE MINUTES:Status} will not return anything. Status is not a state its a State group. You need to report on an actual state like New or New Orders or Submitted etc.
Sorry ignore what I said I was confused with how you were using it. Status is correct.
So your best bet is to upgrade your system to a SSD drive and faster ram/cpu. Anytime you put anything on Entities it will slow it down that is unavoidable. It is having to query for each one. The more entities you have the bigger the potential slowdown will be.
Now showing like this
the ticket numbers are showing correctly when i use the entity for the first time. But when i am using it the second time, the previous ticket number is concatinated with the current number