Focal Point
[CLOSED] Characters in string delivered to browser as Hex

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

June 13, 2013, 04:28 PM
noelmcavoy
[CLOSED] Characters in string delivered to browser as Hex
I am trying to create a Dynamic HTML link using define's instead of the style (shown below) so that I can make the link active conditionally.
 
TYPE=DATA,
     COLUMN=PAYMENT_REQ_DOC_NUMBER,
     TARGET='_blank',
     URL=https://my.domain.com/DocHandler.do?(command='displayDocSearchView' docId=PAYMENT_REQ_DOC_NUMBER),$

The problem is that the browser receives
<TD class='x23'>
220117
</TD>


( note the hex values ) and displays the following, clearly not recognizing it as html.
 220117


My fex code generating this is the following....

 SOURCE_STRING/A150 = '<'|'a href="https://my.domain.com/DocHandler.do'|'?'|'command=displayDocSearchView'|'&'|'docId=substringone'|'"'|'>'|'substringtwo'|'<'|'/a'|'>';
 SOURCE_LEN/I3      = ARGLEN(150, SOURCE_STRING, SOURCE_LEN);
 TEMP_ONE/A12       = 'substringone';
 TEMP_ONE_LEN/I3    = ARGLEN(12, TEMP_ONE, TEMP_ONE_LEN);
 SUB_STRING/A100    = GL_CURRENT.TRANSACTION_DETAILS.TRANSACTION_EDOC;
 SUB_LEN/I3         = ARGLEN(100, SUB_STRING, SUB_LEN);
 OUTPUT_ONE_LEN/I3  = (SOURCE_LEN - TEMP_ONE_LEN) + SUB_LEN;
 OUTPUT_ONE/A150    = STRREP (SOURCE_LEN, SOURCE_STRING, TEMP_ONE_LEN, TEMP_ONE, SUB_LEN, SUB_STRING, OUTPUT_ONE_LEN, OUTPUT_ONE);
 TEMP_TWO/A12       = 'substringtwo';
 TEMP_TWO_LEN/I3    = ARGLEN(12, TEMP_TWO, TEMP_TWO_LEN);
 KFS_URL_LEN/I3     = (OUTPUT_ONE_LEN - TEMP_TWO_LEN) + SUB_LEN;
 KFS_URL/A150       = STRREP (OUTPUT_ONE_LEN, OUTPUT_ONE, TEMP_TWO_LEN, TEMP_TWO, SUB_LEN, SUB_STRING, KFS_URL_LEN, KFS_URL);


Can someone please help or point me in the right direction, I've spent hours searching these forums, the IBI documentation, and the internet in general without any success.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.1.0.5
Windows 10, all output
June 13, 2013, 04:31 PM
Doug
Is this, what you're attempting to make, a link within a report?




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
June 13, 2013, 04:35 PM
noelmcavoy
I am trying to make a link in the report, it seems what i wrote in my post made a link out of what the string I wanted to show whole. In my report it shows the whole string from the opening of the html anchor tag to the close all as one string. I will correct this for clarity if I can.


WebFOCUS 8.1.0.5
Windows 10, all output
June 13, 2013, 04:50 PM
noelmcavoy
the only way i could get them to show properly is to add the text in images. any help would be greatly appreciated.


WebFOCUS 8.1.0.5
Windows 10, all output
June 14, 2013, 08:51 AM
J
You may need to use escape characters and/or hex values for different parts of your hyperlink. For example, WebFOCUS expects the ampersand to be the start of a variable. Search the forums for different examples on what you need.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
June 14, 2013, 09:22 AM
noelmcavoy
Thanks for your response J, everything that I've found on using amperstands say that there needs to be a pipe ('|') between the amp and what follows which I did. As for escaping charaters, I tried escaping each of the <,>,?,& characters and the result was a the same string with the '\' character before each of them. WF seems to insist on displaying the entire string as is.


WebFOCUS 8.1.0.5
Windows 10, all output
June 19, 2013, 01:33 AM
njsden
Going back to your actual requirement (if my understanding is correct):

quote:
... so that I can make the link active conditionally.


Does the URL link created by the tool via STYLE declaration work?

If so, and all you need is to make such link available upon a particular condition, why not DEFINE a new field where you establish if your condition is met or not and then use that result as part of the WHEN= clause in the stylesheet declaration?

DEFINE FILE BLAH
SHOW_LINK_FLAG/A1 = IF <your_complex_condition_here> THEN 'Y' ELSE 'N';
END

TABLE FILE BLAH
PRINT
        PAYMENT_REQ_DOC_NUMBER
        ANOTHER_FIELD_1
        YET_ANOTHER_FIELD_2
        MAYBE_ANOTHER_FIELD_3
        LAST_ONE_4
        SHOW_LINK_FLAG   NOPRINT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE * 
TYPE=DATA,
     COLUMN=PAYMENT_REQ_DOC_NUMBER,
     TARGET='_blank',
     URL=https://my.domain.com/DocHandler.do?(command='displayDocSearchView' docId=PAYMENT_REQ_DOC_NUMBER),
     WHEN=SHOW_LINK_FLAG EQ 'Y',
$
ENDSTYLE
END



That could be much easier than trying to redo what the tool can already do for you.

Again, maybe I'm misunderstanding your requirement so let us know if that's the case so we can try and tailor something else that may help Smiler



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.