Jump to content

Using Calculated Button Segments For Data Display


This topic is 2351 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Since FM14 came out with the new button bars having the ability to calculate data on the fly on layouts for display purposes has been great - the fact that you can display data without a dedicated calculated field or extra relationships just to display a bit of information.

So I am generating a document that prints a portal however the data is not connected to the portal in the traditional parent / child relationship - but rather it's showing related data for the given product kits. This invoice line item record is not "parent" to the portal of kit items.

That presented a  challenge - originally i had a convoluted way to generated this report using a virtual list but the it required a bit more effort to generate, so how to get totals to display properly in the portal row to multiply quantities - and to also show a total of items packed?

One thought would be to put global fields in to the kits lookup table and then set them which would drive keys to the data tables via dedicated relatiohships just prior to generating the report, but that just felt awkward. 

Here is what I came up with. The row of 6 kits are what the customer ordered based on this there needs to be 108 pieces based on the piece count for each item in the kit multiplied by the quantity ordered. Example 6 x 12 = 72 as you can see by the first row in the portal.

56a08943bd776_ScreenShot2016-01-20at11.1

To get the value of the 72 I added a singe segment button bar to the portal and multiplied the 6 by the 12 pretty simple.

56a089d89cdca_ScreenShot2016-01-20at11.256a08a2d55108_ScreenShot2016-01-20at11.2

This was all great but I also needed to get a total for the total items packed but that is based on yet another table not directly tied to the kit table.

So by adding a second calculation button segment and this formulae I was able to get the necessary data.

56a08ab08c2ad_ScreenShot2016-01-20at11.2

Hope you find this useful.

Cheers.

  • Like 3
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.