Focal Point
&VAR in Single Quotes Behavior

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2191092881

September 29, 2006, 03:21 PM
mgrackin
&VAR in Single Quotes Behavior
Can anyone explain this?

As a rule of thumb, I have found that I should never put single quotes around an &VARIABLE name in a Dialogue Manager statement because FOCUS will think the name of the variable is the value. I always leave off the single quotes. However, whenever I use an &VARIABLE in a TABLE FILE statement such as a WHERE clause, putting single quotes around the &VARIABLE name works fine.

Just as a side note, if I add a .EVAL to the &VARIABLE name between single quotes in a Dialogue Manager statement it works properly. FOCUS evaluates the statement using the value of the &VARIABLE instead of the name.

I was just curious if anyone has experienced this behavior and can explain why.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
September 29, 2006, 10:39 PM
susannah
hi mick
without quotes inside a TF, focus is guessing its a fieldname, but if your &var is numeric, then you don't use the '.
-s




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
October 02, 2006, 04:28 PM
mgrackin
Susannah,

Thanks for the reply but my question is more about the Dialogue Manager behavior, not the TF bahavior. I have learned my lesson with the WHERE clause and what it thinks is a FIELDNAME!


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011