Product was successfully added to your cart.

CC Pivot Is In My File. How Can I Upgrade?

If you have already spent some time integrating CC Pivot into your own file (and out of the CC Pivot file), and you have seen the upgraded version (if not you can get it here) and would like to have the export to excel functionality integrated as well, you might be wondering if you can get version 1.1 into your file without too much pain. Well, you can! Here’s how.

The Quick Path

If you feel pretty comfortable with CC Pivot and FileMaker in general, here’s a quick path to upgrade. It can also be used as just a basic overview, as I’ll go into more detail further into this post. Or, you can just skip right down to the detailed path.

1. Copy & Paste One Field

The field CCP.Pivot::_exportas needs to be copied to the CCP.Pivot table in your solution.

2. Copy & Paste Two Scripts

Two scripts need to be copied to your solution.

  • m.current.pivot.export_xls [ { filename ; filepath } ] (found in the folder: CC Pivot -> models -> current pivot)
  • c.pivot.excel (found in the folder: CC Pivot -> controllers -> pivot)

They should copy and paste without any problems, unless you have renamed the CCP.Pivot table occurrence. If you have, our recommendation is to name your version of the CCP.Pivot table occurrence back to CCP.Pivot before doing the copy and pasting, then change it back after that process is completed. This way the field references won’t break.

3. Copy & Paste One Button

On the layout CC Pivot there is a new button on the bottom left with “Excel” as its label. Copy and paste that button to your solution where your pivot display is. Alternatively, you can create your own button in your solution and just make sure it calls the c.pivot.excel script.

The End

That’s it. Not too hard, eh? Below we’ll go over the same thing with some screen shots to help explain things a little more in detail.


The Detailed Path

Now let’s examine each of the above sections and show you in a little more detail exactly what we mean. To get ready to follow these instructions, have both CC Pivot 1.1 upgraded file open as well as your own file. If this is too far down in the details, you can pop to the surface by looking at just the quick path.

1. Copy & Paste One Field

There are a few new fields in the CC Pivot 1.1 upgrade. Most of the fields are to help with the newly added import from previous version feature. However, since you aren’t importing any data, but rather upgrading your own version of CC Pivot that you’ve integrated, you won’t need those fields. The one field you will need is in the table CCP.Pivot and named _exportas. It’s a global text field that can be found towards the bottom.

cc pivot add field for version 1.1

  • Open up the Manage Database dialog in CC Pivot 1.1
  • Go to the table CCP.Pivot and open it to see its fields
  • Select the field _exportas
  • Copy it
  • Close the Manage Database dialog
  • Open the Manage Database dialog in your file
  • Go to the CCP.Pivot table that you have previously added and go into its fields
  • Paste the field into the table
  • Close the Manage Database dialog window

All done with this step!

2. Copy & Paste Two Scripts

In this step we have to copy & paste two scripts into your file. They should copy & paste without any problems, unless you have renamed the CCP.Pivot table occurrence in your system to something else. If this is the case, you will want to rename it back to CCP.Pivot before we proceed with this step, and then name it back to your chosen name after this step. Doing this will ensure that no script steps are broken.

Script 1: m.current.pivot.export_xls [ { filename ; filepath } ]

cc pivot add model script

  • Open the Manage Scripts dialog window in CC Pivot 1.1 and in your file
  • Find the CC Pivot -> models ->current pivot folder in the CC Pivot 1.1 Manage Scripts Dialog window and select the m.current.pivot.export_xls [ { filename ; filepath } ] script as seen in the picture above
  • Copy it
  • Select your file’s Manage Scripts dialog window and paste the script wherever you want it to be (we recommend using the same folder schema)

That’s that one, now on to the next one!

Script 2: c.pivot.excel

cc pivot manage controller script

  • Open the Manage Scripts dialog window in CC Pivot 1.1 and in your file
  • Find the CC Pivot -> controllers ->pivot folder in the CC Pivot 1.1 Manage Scripts Dialog window and select the c.pivot.excel script as seen in the picture above
  • Copy it
  • Select your file’s Manage Scripts dialog window and paste the script wherever you want it to be (we recommend using the same folder schema)

That’s it! You’re done with step two. Almost there!

3. Copy & Paste One Button

In the previous step you copy & pasted a script called c.pivot.excel into your file. This is the script that you will want to call in order to perform the export to excel. You’ll want to have a way to allow your users to easily run this script. So you’ll want to have a button that is tied to this script. We’ve made one for you in CC Pivot 1.1!

Using our button

cc pivot export to excel button

  • Go to Layout Mode in CC Pivot 1.1 and in your own file
  • Open the CC Pivot layout in CC Pivot 1.1 and the layout that contains the pivot display in your own file
  • Select the button labeled “Excel” at the bottom left of the screen in CC Pivot 1.1
  • Copy it
  • Go to your file’s layout and paste the button wherever you like

Using your own button

  • In your own file, find the layout where you are displaying the pivot
  • Make a button and place it wherever is most appropriate for your file
  • Attach the c.pivot.excel script to that button

Finished!

Congratulations, you’ve upgraded your integrated version of CC Pivot to include exporting to excel!

And, in the words of our society’s most distinguished, “That’s All Folks!”

Author Court Bowman

Court Bowman has been working with in the IT field his whole life, working as a network engineer, database developer in Oracle and Progress and as a IT director for several firms. He has been working with FileMaker Pro since version 2 and has been a reoccurring speaker at the FileMaker developer conference. Apart from his expertise in FileMaker Pro he has experience in system architecture and design, data modeling and database architecture. He also has years of experience as a process and workflow consultant and has helped with the design and deployment of hundreds of systems in FileMaker and on the web.

More posts by Court Bowman

Leave a Reply

All rights reserved Cleveland Consulting.

Call Now Button