Focal Point
[SOLVED] Set an URL with ampersand(&) in it to a variable

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

August 25, 2009, 05:53 AM
MKS
[SOLVED] Set an URL with ampersand(&) in it to a variable
I need to set a variable as below:-

-SET &URL_LINK = 'http://www.XXXXXX.com/yy/as/df/kl?LMCS_UGT=management&LMCS_ID=studies

but i am not able to do so. It is giving error as "value missing for LMCS_ID". how can I nullify the ampersand(&) effect?

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


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
August 25, 2009, 06:43 AM
SureshKumar
Include a pipe symbol after the '&' to avoid this.

-SET &URL_LINK = 'http://www.XXXXXX.com/yy/as/df/kl?LMCS_UGT=management&|LMCS_ID=studies';


Webfocus 8002M, 8009
OS: Windows7
August 25, 2009, 07:47 AM
MKS
Now i think pipe did nullify &, but it is giving new error now. As
(FOC3202) BAD VALUE IN STYLESHEET FILE AT LINE: 462
URL=http://www.XXXXXX.com/yy/as/df/kl?LMCS_UGT=management&LMCS_ID=studies/


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
August 25, 2009, 08:21 AM
Danny-SRL
MKS,
Can you show the stylesheet element where you have the URL? Maybe you have a comma or a comma-dollar missing?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

August 25, 2009, 08:26 AM
MKS
Here it is

TYPE=SUBHEAD,
BY=11,
LINE=2,
OBJECT=TEXT,
ITEM=2,
SIZE=14,
COLOR='RED',
URL=&URL_LINK,
$


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
August 25, 2009, 09:32 AM
MKS
I have checked it and it seams the ' =' in the URL is creating trouble. I have tried to escape the '=' using pipe(|) but it didn't work as it did for '&'.

Any thoughts please....


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
August 25, 2009, 09:52 AM
Fernando
Have tried directly without using the variable URL_LINK?

TYPE=SUBHEAD,
BY=11,
LINE=2,
OBJECT=TEXT,
ITEM=2,
SIZE=14,
COLOR='RED',
URL=http://www.XXXXXX.com/yy/as/df/kl?LMCS_UGT=management&|LMCS_ID=studies,$

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
August 25, 2009, 09:57 AM
MKS
quote:
directly without using the variable URL_LINK



I have tried that too. It gave same error.


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
August 25, 2009, 12:08 PM
j.gross
If you enc;lose the URL value in quotes(like 'RED' in the line above that), that may overcome the stylesheet parser's dyslexia.
TYPE=SUBHEAD,
BY=11,
LINE=2,
OBJECT=TEXT,
ITEM=2,
SIZE=14,
COLOR='RED',
URL='&URL_LINK',
$

August 26, 2009, 05:30 AM
MKS
quote:
http://www.XXXXXX.com/yy/as/df/kl?LMCS_UGT=management&|LMCS_ID=studies

This too didn't help me, it gave error as
(FOC3202) BAD VALUE IN STYLESHEET FILE AT LINE: 462 URL=http://www.XXXXXX.com/yy/as/df/kl?LMCS_UGT=management&LMCS_ID=studies


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
August 26, 2009, 07:48 AM
GamP
The url you use is a standard URL with parameters. That means that you should code your URL with parameters in the syntax provided for this. So, code it as follows:
URL=http://www.XXXXXX.com/yy/as/df/kl(LMCS_UGT='management' LMCS_ID='studies'), $

and your problems are gone.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 26, 2009, 10:19 AM
MKS
GamP,
Thanks a lot that did the trick, it worked.


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
September 11, 2009, 12:40 AM
TexasStingray
This my be easier

-SET &URL_LINK = 'http://www.XXXXXX.com/yy/as/df/kl?LMCS_UGT=management' | '&' | 'LMCS_ID=studies';




Scott

Tex,
The string has to be used in a drill-down instruction in the style sheet. It won't work that way. In styling you have to do it the parameterized way that I showed a few posts back in this thread.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988