Focal Point
[SOLVED] Issue with ampersand in the varaiable name

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

August 17, 2009, 08:32 AM
lalita
[SOLVED] Issue with ampersand in the varaiable name
Hi,

I am facing an issue with a variable name(i.e. &ISN in the below code ) which is something like - 'C&E Test Name'. When I enter this name in the filter page and run the report,I am getting an error like : -

(FOC295) A VALUE IS MISSING FOR: &E

The code is like -

-SET &ADN = IF &ISN EQ '' THEN '' ELSE 'IF @EVN EQ ''&ISN.EVAL''';
-SET &ADNFIL = IF &ISN EQ '' THEN '-' ELSE TRUNCATE(&ISN);
-TYPE ADN &ADN
-EXIT
Here itself I am getting this error.

Further I am using &ADN in creating the main filter condition -

-SET &WHR = ' IF @UID EQ &UID.EVAL ' |
-'IF @SID EQ ''&AUD.EVAL'' ' |
-'&ADN ';

Also,with the same code I am able to fetch records with names as 'Test C&E' and 'Hello C&E Test'.

Is there any way to fetch the 'C&E Test Name' value ?

Thanks.

This message has been edited. Last edited by: Kerry,


764
Windows
PDF,EXL2K,HTML
August 17, 2009, 10:53 AM
GamP
Try it with this line:
-SET &ADN = IF &ISN EQ '' THEN '' ELSE 'IF @EVN EQ ''' | &ISN | '''';



GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 19, 2009, 06:16 AM
lalita
Thanks GamP.It worked.


764
Windows
PDF,EXL2K,HTML