Focal Point
How do you read in an http arg from a FEX?

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

September 15, 2004, 06:36 PM
<Rickson>
How do you read in an http arg from a FEX?
Inside a fex procedure, how do I access an HTTP parameter that was passed in? Does anyone know where in the documentation I can read about how to do this? Thanks
September 15, 2004, 06:57 PM
<Vipul>
For example this is your http request:
https://xyz.com/ibi_apps/WFServlet?&IBIF_ex=combo&CUSTOMRPTKY=3498

Define the following DM in your .fex

-DEFAULT &CUSTOMRPTKY = '1000';

Vipul
September 15, 2004, 07:06 PM
<Rickson>
Thanks Vipul. So the fact that ther eis an & before the variable indicates that it is to be read in from http, and the DEFAULT says to default it to 1000?
September 15, 2004, 07:12 PM
<Vipul>
Rick,

'&' defines it as a Dialog manager variable.
-DEFAULT &VAR says to default the value (could be anything, 1000 was just an example) the value from your url param will override this value.


Vipul
September 15, 2004, 08:50 PM
<Rickson>
Where does it talk in the documentation about all this? I couldn't find it anywhere. Thanks
September 16, 2004, 03:18 PM
<monte2000>
Rickson:

What subroutine or function are you using? Is it WebFOCUS, FOCUS or iWAy? Documentation Services can give you better idea of where to find teh right doc once you've told us this info.

Monica
September 16, 2004, 03:43 PM
<Vipul>
Hey Rickson,

This is the link for 'Developing Applications manual' for webfocus 52

http://documentation.informationbuilders.com/masterinde...0/wf_DevRepApp52.pdf

Vipul
September 16, 2004, 07:40 PM
<Rickson>
Well basically, I just to print in the heading of a report the value of an http parm that was passed into the report. I have something like this:

-* File Test5.fex

TABLE FILE sometable
-* Generated by Report Assist
-DEFAULT &REPORT_ID = '0';
HEADING CENTER
"REPORT #" &REPORI_TD
PRINT NODE_ID NODE_name NM
WHERE RECORDLIMIT EQ 100
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE DEFLT
END

Where report_id is what I want to print... thanks
September 16, 2004, 07:54 PM
<monte2000>
Hi everyone:

We are in the process of exploring efficient ways to more tightly tie together Documentation Services and Focal Point and are currently testing different scenarios.

In the interim, we ask that users continue to download documentation and manuals by logging in on the CTSS site with your InfoResponse ID.

Thanks so much!

Monica
September 16, 2004, 08:00 PM
Leah
Rickson (forgive any spelling)

If you have your code like this
-DEFAULT &REPORT_ID = '0';
HEADING CENTER
"REPORT #" &REPORI_TD
PRINT NODE_ID NODE_name NM
WHERE RECORDLIMIT EQ 100


Then you need to put the " after the # after the ..._TD not outside it.

Leah C
September 17, 2004, 06:01 AM
Piipster
Just one clarification on the & symbol.

When used within a focexec like ...

-DEFAULT &CUSTOMRPTKY = '1000';

... the ampersand does indeed indicate a variable.

When used on a url it is simply a delimiter, separating the list variables.
September 17, 2004, 07:30 PM
<Rickson>
Leah, It seems correct to me, but I'm getting the error "0 ERROR AT OR NEAR LINE 14 IN PROCEDURE __T00000FOCEXEC *
(FOC007) THE REQUEST STATEMENT DOES NOT CONTAIN A VERB"

here's the code:

-* File Test5.fex
-DEFAULT &REPORTID = '1000';
TABLE FILE MY_FILE
-* Generated by Report Assist
HEADING CENTER
"REPORT #" &REPORTID

PRINT fname, lname
WHERE RECORDLIMIT EQ 10
ON TABLE PCHOLD FORMAT &FMT
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE DEFLT
END
September 18, 2004, 12:02 AM
Piipster
Change your code to this

HEADING CENTER
"REPORT # &REPORTID "

PRINT fname lname


Note that you put the " at the beginning and end of each line of HEADING. When you put the &var in the HEADING the value assigned to it gets inserted wherever you put it. It must be inside the HEADING line.

Also, you don't need the comma between the list of fields you are printing, only a space.