Author Topic: Formula within a cell  (Read 1834 times)

Whiterhino

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Formula within a cell
« on: January 10, 2022, 10:21:24 PM »
Hi Corey, Seasonal felicitations etc.

I wondered if there was a way to make a calculation within a cell in the layout.

I would like to show the average big blinds per player.

So in other words, (chips in play/ bb/ players left)

is this possible please?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Formula within a cell
« Reply #1 on: January 10, 2022, 11:08:38 PM »
Sure.  Use the <expression> layout token.  This token allows you to display the results of a formula calculation.  An example:

<expression text="chipCount / bigblind / playersLeft" format="number" roundOff="true">

The expression token has a number of options.  You should edit it in the Token Builder window and select the options you want.

Whiterhino

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Formula within a cell
« Reply #2 on: January 11, 2022, 12:50:13 PM »
Works a treat, top man.

Kueen$Bees

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Formula within a cell
« Reply #3 on: February 14, 2023, 08:11:26 AM »
any guidance would be appreciated...

I'm trying to do exactly what is in this post and it isn't working.  my token isn't being calculated (I'm experimenting with a non-formula in my token).   see attached screen shot.

The tournament I'm in is over.  Is this messing things up or am I just missing something?

Thanks
K$B

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Formula within a cell
« Reply #4 on: February 20, 2023, 03:47:29 PM »
Understandable confusion.  What you are doing is editing the Layout Tokens, which are a way for you to create your own tokens or override the value of an existing token.  For example, the <eventName> token will insert into your layout the value of the Event Name field on the Game tab.  If you create a token with the same name, the value you give it will override the actual <eventName> value, so that no matter what you set the Event Name to on the Game tab, it will always display whatever you put into the override.  Why would you do this and/or what is the point?  Mostly it is to allow you to add your own tokens so you can insert those tokens into the layout, then you can change the value of those tokens without having to essentially touch your layout.  This is especially useful if you use the token in multiple places in your layout.  Originally this was added to be able to override the value of the <breakText> token on breaks where there will be a chip-up event.  So you can add/override token values on a per-level basis from the Rounds tab.

What we are referring to in this case is simply inserting the <expression> token into your layout, like this: