Button Bars as Layout level calculations...are there performance advantages?

You’re right I biffed the calc.

JSONGetElement (
GetValue ( $$VL.people ; VirtualList::n ) ;
"name"
)

Is the what I meant. I accidentally wrote a hybrid of an array virtual array and virtual list thx for catching! I fixed the calcs and made a note so you don’t look like a crazy person :wink:

1 Like

Every effort helps to hide the truth :joy:

4 Likes

Another point:

Placeholder dynamic calc

Disadvantages

  • does not appear in preview mode
  • does not appear in table view [EDITED]

Advantages

  • -/- [EDITED]

Buttonbar dynamic calc

Disadvantages

  • does not appear in table view

Advantages

  • does appear in preview mode
1 Like

Another method of creating dynamic content is, of course, web viewers.

Advantage

  • Large possibility of output types, not just text
  • Dynamic dynamic content! E.g. a clock

Disadvantages

  • Webviewer can flash white as it loads
  • Can be memory-hungry
  • On windows web viewer & popover conflict for space
  • On windows Internet Exporer
2 Likes

I'd like to share some crazy stuff with you:
I use Button Bars with calculations extensively in every possible opportunity: as labels, as buttons, as navigation bar, as displayed text, as progress bars, as everything. The reason ist, that button bars are so versatile, especially when you build a multi-language solution.

In my screenshot you see not only Button Bars everywhere, except for the list fields itself. What you also see is 2 Button bar per line (green and blue) as a bar chart for sales and revenue, consisting of 50 Buttons each!. These 50 Buttons work with conditional formatting.

In my screenshot you see a test with over 10.000 Products in a list view. That makes 10.000 x 100 = 1 Mio calculations!!! :crazy_face: (plus a few for the labels :wink:).

And this is getting crazy now: the list view is getting displayed almost instantly. No significant delay whatsoever.

I ran my test with a Macbook Pro 2017, connected to a hosted database on an iMac 2020 via WLAN.

tldr:
Calculated Button bars are fast as hell.

6 Likes

My favorite kind of crazy :smiling_face_with_three_hearts:

very cool - may I suggest for historic reasons to disclose what version of FMP executed?

thanks!

2 Likes

FMP 17 and 18. Sorry for not mentioning this right away.

2 Likes

Just released FM provides layout calculations, which provides a good portion of what a button bar calculation can do. There is a lot of advantages in many use cases to continue to use button bar calculations, but this new feature may provide awesome!

BB calcs do have some limitations, especially within Portals, as they calculate based on the LAYOUT and not the portal (e.g. try a Get (RecordNumber) is a button bar within a portal - it shows the record of the base layout). Maybe this new feature gets around this? Let the testing commence :slight_smile:

{{RecordNumber}} works in a portal // but is not a button
Calc: Contact___Activity__id::zz_RecordNumber_uCN works in a button bar

1 Like