Can't seem to understand some of these formulas

Lot’s of changes from Pan 6 to Pan X.
One example that is driving me crazy.

In Pan 6 had an action in which in a column I wanted to change S.S.P to S.S.P.

In Pan 6 the formula was this:
Field "A"
Change "S.S.P " “S.S.P.”

Ok, now I am trying to do this in Pan X and going crazy.
I assume that this got changed from Change to Changedictionaryname

That’s fine, but in doing the forumla:

Field "A"
changedictionaryname A, “S.S.P”,“S.S.P.”

It seems ok in check but then when I run the action I get this warning

renamedictionarykey (function parameter must be a binary value, not numeric or text.

I can’t figure out what i am suppose to do to get this right.

Please help

A dictionary is a special type of binary value. That’s not what you have there, so ChangeDictionaryName is inappropriate. You can do this with a FormulaFill, and the replace function.

Field "A"
FormulaFill replace(A,"S.S.P","S.S.P.")

Panorama X is not going to implement the change statement but you could make your changes using the replace( function. Your code could simply be:

A=replace(A, "S.S.P","S.S.P.")

This assumes that A is not really a dictionary but simply a text field. Of course for all records you would use what Dave suggests.

Dave is correct, the change command modifies all selected records, so at the moment you need to use formulafill and replace( to get this functionality.

The problem with the change statement is that it uses a completely different syntax than most other Panorama statements. First of all, it uses spaces instead of commas as parameter separators. Also, the optional word and caps parameters don’t have quotes. Because of these issues, Panorama X doesn’t support this statement. There is simply no reasonable way to make it work with an unmodified Panorama 6 change statement.

At some point I may make a similar statement that uses the new Panorama X syntax conventions. But I probably won’t use the name change since that would probably be even more confusing. In the meantime, use formulafill and replace(.

It would be nice if there was some way to document this in the Help system. I’m not sure where to put this in a way that you would find it, but I will think about that.

I use “change” to convert one-letter entries into the final form I want them, so I miss it.

Could I suggest calling it “swap”?

admin
September 21
It would be nice if there was some way to document this in the Help system. I’m not sure where to put this in a way that you would find it, but I will think about that.

Might I suggest simply making a short help topic called “Change” that says something like “This statement from P6 is now no longer available. Instead, use [etc…]” That way people like Sal looking for a way to do this, either P6 users or beginners, will be steered to what they need. I realize that doing stuff like this could take you the rest of your life; you’d be rewriting the beloved old Panorama cookbook that was so useful to so many of us teaching ourselves Pan programming, and you have other things to do right now. But when something like this comes up it could be a candidate for a 5 minute quickie.

BTW, bravo on latest release!
Bill

Thanks! Sadly, sometimes it feels like I’m doing everything wrong :confused:

simply making a short help topic called “Change” that says something like "This statement from P6 is now no longer available.

Yes, that is the obvious thing to do. I might have to do some jiggering to be able to do that, though – the help system is not set up to document things that don’t exist. So that’s what I meant when I said “it would be nice if there was some way” – I might have to make a slight change to the programming of the help system to allow this. So I was just thinking aloud, kind of.

Another option might be to make a new statement that has the word change in it, for example changetext or changeinfield or changefromto or something like that.