Changing Table Button Captions

Now you mention it, yeah I think I may have done something the same myself

This works:

{CALL:custom.formatEntityMinutes('{ENTITY STATE MINUTES:Status}')}
function formatEntityMinutes(entityMinutes) {
	if (entityMinutes.length > 0) {
		return '<br/><color Red>' + entityMinutes + ' min</color>';
	else {
		return '';

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):


Did you missed this?

1 Like

I saw it but didn’t realise it worked in entity display format. Works a treat, thanks!

<if '{ENTITY STATE MINUTES:Status}'!=''><color Red>{ENTITY STATE MINUTES:Status} min</color></if>
1 Like

how can i download 5.1.62

This is the latest release

1 Like

hi emre my versiyon is 5.2.14 now. i write this code but still not working. is there any problem?

{REPORT TICKET DETAILS:T.User:(TEN.Masalar=$1) and (TS.Status=Ödenmedi)}

Where did you write it? What are you trying to do?

İ 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.

I am trying to solve this about 1 year…

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.


How to get ticket number on the entity button.’
I have tried this.
> $1

> TKT No: {REPORT TICKET DETAILS:T.TicketNumber:(TEN.Table=$1)}


But showing as follows.

And i would like to know how to reduce the size of the text also.

When i remove TEN.Table=$1,
All the ticket numbers are showing together on each entity

Try TEN.Tables instead


Your using state formatting right?
<size xx>whatever text</size> will set size for whatever in-between.


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