# Converting a Pan6 formula to PanX

I am trying to convert a Pan6 DB to PanX. One procedure has many formulas that are not valid in PanX. I was told that they were created using the recorder. I have seen that the procedures run and produce a result in Pan6. So far I have not figured out how to convert several of the formulas into PanX. Here is an example.

``````«FieldA»= zeroblank(qty*«FieldB»/2)(/7500*36.00)(+qty*«FielsB»/2/25*.07)(*«FieldC»)+(«FieldB»/2*3.50)
``````

You can see that there are an absence of operators between the parenthetical groups; but there is an operator inside the parentheses. I tried just moving the operators outside the parenthesis, but that produced a different result.

Does anyone know what to do with a formula like this?

I’ve never seen anything like this before, but I’ve been doing a little experimenting, and it looks like the parentheses are simply ignored when the operator comes right after the left parenthesis. Try

``````«FieldA»= zeroblank(qty*«FieldB»/2)/7500*36.00+qty*«FielsB»/2/25*.07*«FieldC»)+(«FieldB»/2*3.50)
``````

and see if that yields the same result.

«FielsB» may be a typo, but I left it that way.

Thanks. I will try that. (FielsB was a typo.)

Parts of that procedure may have been created by the recorder, but that formula was not. Panorama has never had any feature that would automatically create a formula out of thin air.

I did just verify that Panorama 6 will calculate a value for a formula like this:

``````(2*3)(/4*5)
``````

However, this must be a bug. I have no idea what calculation is actually being performed – this absolutely should not be a valid formula.

it looks like the parentheses are simply ignored when the operator comes right after the left parenthesis

That looks true for me as well, but in very limited experimentation. I can’t imaging any reason why Panorama would simply ignore )(, that makes no sense, and I certainly don’t remember ever intentionally designing it to work that way.

I don’t think I would trust the results of this formula. And it’s such a bizarre formula, I can’t imagine relying on this without figuring out what the calculation is actually supposed to be calculating. Ok, Panorama 6 calculates a value, but how do you know it is the correct value?

Okay. I am going to discard the converted formula and get the owner of the db to explain what he thinks he was calculating.
I have not been able to get the same result that Panorama 6 gives.