When converting a database from Panorama 6 to Panorama X, in 99% of all cases the formulas in the design sheet Equation field transfer automatically, and are immediately ready to go. In a few cases manual adjustment is needed. I was just sent a customer file that did need adjustment, and I thought I’d give the entire community the benefit of a short lesson on this.
First of all, if the Panorama 6 database is using spreadsheet mode, the conversion will always work, no problems.
However, if the Panorama 6 database is using procedure mode, and it uses the feature where the last line in the Equation field is a procedure name, a minor adjustment is needed. It should take only a few seconds per field.
Here is part of the design sheet for the database I was sent. The arrows point to where the adjustments will be needed after the database is brought over to Panorama X.
Let’s start by looking at what Panorama does to the first of these equations, which does work. Since the Panorama 6 database was using procedure mode, the equation is transferred into the Code panel of the corresponding field in Panorama X. Since in this case the code is perfectly valid Panorama code, it works fine.
Some of the equations, however, are followed by the name of a procedure. Panorama 6 would automatically call the procedure after it evaluated the preceding formulas. In this example, Panorama 6 would first calculate the FICA value, then call the
.FICA total procedure
Panorama X doesn’t understand when there is simply a procedure name stuck on the end – Panorama X requires that valid code be used, and this isn’t valid. So that means, instead of just a procedure name, you have to use a
call statement. In most cases, all you have to do is type call and a space in front of the procedure name. In this case, since the procedure name contains punctuation, you also have to put quotes around the procedure name. Here is the fixed code.
(Also note that Panorama 6 would allow a colon as a separator between formulas, the colon needs to be removed for Panorama X, i changed it to a carriage return here, but a space will also work.)
Some of you may be wondering why Panorama made this change – why make a change that breaks even a small number of existing databases? In this case there is a big win enabled by this change – in the past you were limited to one or more formulas, and then a procedure name. Now you can put ANY code you want in there. For example, in this case you don’t really need a separate
.FICA total procedure – you can simply put the necessary code right in the Code panel. Much simpler, and clearer, everything that happens when the field is modified is now all in one place, and your View Menu is less cluttered with little 2 or 3 line procedures that are only used in one place.
Another advantage is that you no longer have to remember any special rules. Any code that can be put into a procedure will work here. Once you’ve learned how to write code, you know how to use this feature with no additional learning.