Focal Point
[SOLVED]& in a URL how to?

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

October 21, 2016, 11:04 AM
susannah
[SOLVED]& in a URL how to?
&| doesn't work.
I've got a link to an external site, and that link has an & in it.
so,
TYPE=DATA,URL=.....
doesn't work.
Piping the & doesn't work
creating another &var with the whole url in it, piped or not, doesn't work.
Putting an entire anchor tag is a heading doesn't work, (looks at the left_anchor a and expects to skip some lines Smiler )

Syntax wizards... help!

This message has been edited. Last edited by: <Emily McAllister>,




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
October 21, 2016, 03:23 PM
capples
&| worked for me. Here's the style code I used to have column N1 data produce the hyperlink:
TYPE=DATA,
     COLUMN=N1,
     URL=http://test&|.com,
          TARGET='_blank',
$


Produces http://test&.com


WF 8.2.0.3
Windows 10 64bit
HTML, AHTML, PDF, Excel
October 21, 2016, 03:37 PM
susannah
hello capples....thanks for giving it a go...

the & are in parms, actually. so they follow the url location , etc.

I got it to work by using a redirect
and I discovered something I didn't know...
-DEFAULT &myparm = &myparm ;
as nuts as that sounds, its very helpful at the top of the fex, where you're going to use &myparm as a parm in a link.
Allows the redirect to work,
but still can't get a URL= to work.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
October 23, 2016, 04:48 PM
Waz
If all else fails, just stick it in a define/compute field and reference that in the URL in the stylesheet


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 27, 2016, 08:27 PM
David Briars
We use the WF StyleSheet URL parm to create links to external websites, though we perhaps more often create HTML anchor tags in DEFINE/COMPUTEs.

Here is an WF StyleSheet URL example, with parms to be passed, and one of the parm values is an amper with a '&':
-DEFAULTH &PARM2 = 'AT&T'
-*
TABLE FILE CAR
PRINT CAR
IF RECORDLIMIT EQ 1
ON TABLE SET STYLE *
 TYPE=DATA,
  COLUMN=CAR,
  URL=http://httpbin.org/response-headers?( \
   PARM1='Time Warner' \
   PARM2='&PARM2' \
   PARMCAR=CAR \
  ),
$
ENDSTYLE
END 

This message has been edited. Last edited by: David Briars,
October 31, 2016, 11:16 AM
susannah
thanks everybody
I'm not passing a parm
I'm passing an &
(not going to wf, going to BO)
funny, Jeff Shein gave me the exact same example..
the key in his example was
-DEFAULTH &someparm = &someparm ;
[which , interstingly enuf, obviated the prompting.]
I got it to work with a redirect




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID