Finding same content in an active field with a procedure-Issues with Field Names with a space in them

If this is Redundant I apologize.

Finding same content in an active field with a procedure on Panorama 6. MacOS Sierra.

I wrote about this recently and Jim cleared up the initial issue eloquently. The other two member also helped out but I cannot now see their responses so thank you also, missing names.

Here:

I have battled error issues with the procedure below, which seems quite simple.

But when I execute it it works with a field name without a space within it’s Field Name but I get error messages when the Field Name has a space, Like “Area Code” or “Address 1”.

It took me hours to run this correlation down.

Is it a “bug”, or is my syntax somehow not quite correct?

Hours of frustration. What am I doing wrong on such a simple procedure?

PROCEDURE

;

;---------------------------Called “.FindSameContent-Faster”

;Find same content in field- this is the new version. Faster

;

Local LFieldName,LFieldContent

LFieldName=info(“fieldname”)

LFieldContent=GRABDATA(“”,info(“fieldname”))

;

execute {Select }+LFieldName+{=“}+LFieldContent+{”}

show

endnoshow

Many thanks.

George

It is normal behavior of field names in procedures. You have to use chevrons around field names containing spaces or punctuation.

chevronquoted(info("fieldname"))

George, you know that what you are trying to do can easily be done in Panorama X with a right-click on the active cell?
38

Re: [Panorama Discussion Forum] [Panorama “Classic”] Finding same content in an active field with a procedure-Issues with Field Names with a space in them
Thanks Kurt.
Yes, I am aware of the right click on an active cell but that does not work in a form. At least I cannot make it work.
Thanks for explaining my error.
And much appreciated for responding to my post. The forum is awesome.
I just wish I was more proficient and could help more often. I don’t make my living programming in Panorama. Panorama just makes me making a living a hell of a lot easier.
These latest efforts was to shave 5 seconds or so on a procedure, poorly written, that now works like lightning.
Best Regards,
George
He who asks is a fool for five minutes, but he who does not ask remains a fool forever. Chinese Proverb