Changing Table Button Captions

I have 4 Entities (maybe more eventually). I have a custom field named “Credit Limit” ONLY on Customer Entity and Tab Entity and therefore only wish to display the line in the button caption if the field exists (or is non-zero) for the Entities Customer & Tabs.

Do you mean you create +4 entities for each customer?

So My name is Paul Barnes. My Customer Entity Name is 01000. How My Tab entity is named?

No, sorry I have 4 Entities Types:
ENTITY TYPE:Customers: have credit limit Custom Field
ENTITY TYPE:Tabs: have credit limit Custom Field
ENTITY TYPE:Pagers: have no custom field
ENTITY TYPE:Tables: have no custom field

The “+” only meant I may add another few Entity TYPES later.

This is my attempt:
{REPORT ENTITY DETAILS:'<br/>Credit Limit ' +[EC.Credit Limit]:(EN={ENTITY NAME}):(TCET=Customer)}
I have embedded the "<br/>" so it only throws a new line if the line is created. Unfortunately it is getting created for all Entity Types.

Not tested but you can try this.

{REPORT ENTITY DETAILS:'<br/>Credit Limit ' +[EC.Credit Limit]:(EN={ENTITY NAME}) and (ET=Customers)}

I’ll test it when I get back to home.

:scream:
Yes that worked AND I was so close! Gees I just what to get one on these myself…

Ok so I can duplicate the line for Tabs - great.

EDIT: No need as I approach “semi-guru status for 1 minute haha”
{REPORT ENTITY DETAILS:'<br/>Credit Limit ' +[EC.Credit Limit]:(EN={ENTITY NAME}) and ((ET=Customers) or (ET=Tabs))} <- Working Great!

So its 1.51am in the morning, how about a quick spot on hiding this below line for ENTITY:Tables and ENTITY:Pages if they do not have a Account OR Account Balance?

<br/> On Account: $ {ENTITY BALANCE} <- Only required for Entity:Customer & Entity:Tabs?

2.30am must sleep. As {ENTITY BALANCE{} takes no arguments the only other option is {ACCOUNT BALANCE:x} but I cannot get this work is the same optional line format as Credit Limit? Tabs & Customer may have an Account (if an account was created). Pagers & Tables will not have any account so?

Hopefully the Good Fairy :ribbon: will leave me a present when I wake up.

Can anybody help with the syntax to make this only calculate for a particular Entity Type, please? I cannot see to get {ACCOUNT BALANCE} to work or find documentation on {ENTITY ACCOUNT BALANCE} as referenced below:

See emre comment in this post.

I’ve added E.Balance field to {REPORT ENTITY DETAIL(S):X} tag. You can use it after next refresh.

  1. You can try using {REPORT ENTITY DETAIL} (not details) tag instead. If it works if will work more efficiently for single entities.
  2. Instead of dealing with Entity Types you can just check if E.AccountId > 0. That will work if entity have an account.

Sorry, emre I do not understand how I would construct the syntax? Use (1) or (2) or both?

Ok I have not idea how to use:

But as far as I can read {ACCOUNT BALANCE:x} is the only Tag than uses parameters so this as as far as I can get :pensive:

1 Like

So you dont want to try the {REPORT ENTITY DETAIL:X} tag?

Well, could you “throw me a bone” at least as I can not see how that Tag can access an Entities Account Balance?
Sad really when you start researching your own posts! :cry: But I cannot find much on the use of {REPORT ENTITY DETAIL:x} - like what formats can be placed in “x”. This is my issue that I am getting stuck on…

{REPORT ENTITY DETAIL:EC.Credit Limit:(EN={ENTITY NAME})}

Sorry kendash happy with that syntax it is the old “{ENTITY BALANCE}” or more so {ACCOUNT BALANCE:x} so I can use the “X” to filter out Entities without Accounts and with Account Balances.

{REPORT ENTITY DETAIL:'Credit Limit '+[EC.Credit Limit]:(EN={ENTITY NAME}) AND E.AccountId > 0}

How do I get Entity Account Balance your the above syntax?

I dont know let me research it and try a few things until I discover it one moment.

1 Like

Hey kendash from above:

Maybe I should just move on and wait for this refresh? I now sort of understand what emre said…
So I am not sure if you read that bit - I am only persisting as he said “you can try…”

{REPORT ENTITY DETAIL:'<br/>Account Balance\: {ENTITY ACCOUNT BALANCE:{ENTITY NAME}}<br/>Credit Limit\: $'+[EC.Credit Limit]:(EN={ENTITY NAME}) AND E.AccountId > 0}

BTW i had to escape the colons for them to show up. Thats why you see \:

PS: @QMcKay check out those Tag Nestings! lol

2 Likes

:scream:
IS THERE NOTHING YOU CANNOT DO!
Yes was shouting that - seriously, I am humbled AND works on 1 State across all Entities :sunglasses:

EDIT: You even manage to merge 2 lines into 1 - Credit Limits & Account Balances!

I didnt even know we could do that until just now when I tried it lol. I first thought it didnt work until I figured out to escape the :

Slightly tweaked to add dollar signs:

{REPORT ENTITY DETAIL:'<br/>Account Balance\: ${ENTITY ACCOUNT BALANCE:{ENTITY NAME}}<br/>Credit Limit\: $'+[EC.Credit Limit]:(EN={ENTITY NAME}) AND E.AccountId > 0}
2 Likes