After many years of using Panorama, I still consult the help page to get the syntax of statements and functions, where it will tell you if you need curly brackets.
The related( Help page does not give an example of how to handle a field name with spaces so it is understandable that Sam got confused with the way to set up the formula. Since the parameter is a formula that is going to be used “as is” in the function. It has to be written so that it make sense when it is executed. I’ll use a simple execute statement to show what is happening.
If I want the field named “Test Field” to be set to a value using execute with a variable having the field’s name and write it like this:
let x="Test Field"
execute x+{="Something"}
I’ll get an error because the field name has a space and will be executed as:
Test Field="Something"
Now if I write the code like this:
let x="«Test Field»"
execute x+{="Something"}
It executes as:
«Test Field»="Something"
I always try to eliminate spaces in my field names and this is very easy now that we have the option in the Field Properties Dialog to set the Title to something other than the actual field name. So, in my example above I could have the actual field name as “TestField” and have the title set to “Test Field” for display in the datasheet. Now both versions of the formula would work once I change the value of x to “TestField”. The down side is that you have to remember that the actual field name is other than what is displayed in the datasheet when coding a procedure.
Hope this casts a little light on the subject and doesn’t make it even more confusing.
It does clarify much. I had been thinking of chevrons as a way to quote field names, but really it is a way to identify the characters between the chevrons as a field name.
Thank you.
There is some truth to both of these ideas. Chevrons play the same role with field (or variable) names that quotes do with strings of text. They indicate where the name begins and ends, and that every character between them is simply part of the name, and doesn’t serve any special function. Commas, spaces, asterisks, hyphens, parentheses, plus signs, slashes, etc. could all be included in the name, as long as you put chevrons around that name.
They also serve to indicate that this is a field or variable, and not a text constant.