Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Help! Fex Runs but not when called by HTML Page

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Help! Fex Runs but not when called by HTML Page
 Login/Join
 
Master
posted
Its been a while since I experienced the joy of troubleshooting these quirks! We are still on WF 8008. I have a fex that creates a few HOLD files and then a report. it runs fine stand alone. It immediately fails when referenced by an HTML page. I tried to make this a simple as possible to illustrate what is going on. I only show the first part of the process, since that is where it fails....

If I run this fex it runs error free writing 64 records to the hold file.

APP HOLD foccache
SET ASNAMES = ON
-DEFAULT &INVCREATIONPERIOD = 201807
-DEFAULT &RPTBANBR = 30600


JOIN
LEFT_OUTER
TABLE1.TABLE1.INVCREATIONPERIOD
IN TABLE1 TO UNIQUE
TBLMSTR_CALENDARPERIOD.TBLMSTR_CALENDARPERIOD.PERIOD IN TBLMSTR_CALENDARPERIOD
TAG J5 AS J5
END

DEFINE FILE TABLE1
RPTPD/I11=&INVCREATIONPERIOD;
END

TABLE FILE TABLE1
SUM
TABLE1.TABLE1.IDXRVU99WRVUS
TABLE1.TABLE1.BUDGWRVUS
BY LOWEST TABLE1.TABLE1.BILLINGPROVIDERNM
BY LOWEST RPTPD

WHERE ( TABLE1.TABLE1.INVCREATIONPERIOD LE &INVCREATIONPERIOD.(OR(FIND TABLE1.TABLE1.INVCREATIONPERIOD,TABLE1.TABLE1.INVCREATIONPERIOD IN TABLE1)).INVCREATIONPERIOD:. );

ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLDDTLS FORMAT ALPHA
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END



When I reference this fex on an HTML page and run, it ends in error:

0 ERROR AT OR NEAR LINE 16 IN PROCEDURE New_ProcedureFOCEXEC *
(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: RPTPD
0 ERROR AT OR NEAR LINE IN PROCEDURE new_procedure
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: RPTPD
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT


What the heck is going on. RPTPD is the value the user chooses for the INVCREATIONPERIOD - see WHERE with LE condition - but I also want to bring this value along for use in a subsequent fex, hence RPTPD. It is I11 as is the TABLE1.INVCREATIONPERIOD.

Again, the fex runs fine EXCEPT when on the HTML page.

Can you help?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Virtuoso
posted Hide Post
Add WITH BILLINGPROVIDERNM to your define and see if it fixes it.
  
DEFINE FILE TABLE1
RPTPD/I11 WITH BILLINGPROVIDERNM =&INVCREATIONPERIOD;


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Master
posted Hide Post
..same error!


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Virtuoso
posted Hide Post
I would turn on &ECHO to see what's being substituted. -SET &ECHO=ALL;

Also, would it make a difference if you add .EVAL to &INVCREATIONPERIOD?
  
DEFINE FILE TABLE1
RPTPD/I11 WITH BILLINGPROVIDERNM =&INVCREATIONPERIOD.EVAL;


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Master
posted Hide Post
no that did not make a difference.

Funny if I hard code RPTPD to equal 201807 I STILL get the error...


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
Oops..I mean IT WORKS when I hard code it...it must have something to do with the &INVCREPERIOD...no idea what though....


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
I thought perhaps this was due to the multiselct OR...changed it to a single select...now it seems to work...makes sense I guess. Not sure why the fex let it go but the ehtml page did not...


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Virtuoso
posted Hide Post
Try with the fallowing
RPTPD/I11=EDIT(&INVCREATIONPERIOD);

As far as for what I can see, applying a value to a variable as you did (-DEFAULT &INVCREATIONPERIOD = 201807) make the value as alphanumeric, not a number.
So trying to assign a characters to an Int field (RPTPD/I11=&INVCREATIONPERIOD) it's not valid.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
Well, after I changed the WHERE to a DINGLE select it worked.

Why do you say:
-DEFAULT &INVCREATIONPERIOD = 201807

yields an alphanumeric...and how would I alter this piece to make it numeric anyway?

RPTPD must be numeric...it gets linked to another table a few queries down the road and that filed is numeric...

Like I said, I think the multi select was the culprit....I am just getting back to this...we will see if it continues to work...


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
I think that the problem that you are running into is that with a multiselect, it will be alphanumeric by default because if the end user makes a multiple selection, then the value of the parameter will be each value that was selected separated by an 'OR' or comma so it would have to be an alpha.

This might demonstrate it. This is a multi-select:
 
TABLE FILE CAR
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
BY CAR.BODY.SEATS
WHERE CAR.BODY.SEATS EQ &SEATS.(OR(FIND CAR.BODY.SEATS IN CAR |FORMAT=I3)).SEATS:.;
ON TABLE HOLD
END

-RUN

-TYPE &|SEATS/&SEATS.TYPE&SEATS.LENGTH = &SEATS  

When I select the values 2 and 4 I get the following output:
  
0 NUMBER OF RECORDS IN TABLE=       10  LINES=      9
&SEATS/A10 = '2' OR '4'

The parameter is an A10

This is single select:
TABLE FILE CAR
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
BY CAR.BODY.SEATS
WHERE CAR.BODY.SEATS EQ &SEATS.((FIND CAR.BODY.SEATS IN CAR |FORMAT=I3)).SEATS:.;
ON TABLE HOLD
END

-RUN

-TYPE &|SEATS/&SEATS.TYPE&SEATS.LENGTH = &SEATS 

When I select the number 2 I get this:
  
0 NUMBER OF RECORDS IN TABLE=        5  LINES=      4
&SEATS/N01 = 2

The parameter is Numeric with a length of 1

So, in your code above:
quote:

  
DEFINE FILE TABLE1
RPTPD/I11=&INVCREATIONPERIOD;
END


You cannot assign an alpha that is returned from a multi-select to an I11.

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


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Master
posted Hide Post
Try removing your define and change the BY field to the field INVCREATIONPERIOD and defining the field type in your WHERE
  
APP HOLD foccache
SET ASNAMES = ON
-DEFAULT &INVCREATIONPERIOD = 201807
-DEFAULT &RPTBANBR = 30600


JOIN
LEFT_OUTER
TABLE1.TABLE1.INVCREATIONPERIOD
IN TABLE1 TO UNIQUE
TBLMSTR_CALENDARPERIOD.TBLMSTR_CALENDARPERIOD.PERIOD IN TBLMSTR_CALENDARPERIOD
TAG J5 AS J5
END

-* DEFINE FILE TABLE1
-* RPTPD/I11=&INVCREATIONPERIOD;
-* END

TABLE FILE TABLE1
SUM 
TABLE1.TABLE1.IDXRVU99WRVUS
TABLE1.TABLE1.BUDGWRVUS
BY LOWEST TABLE1.TABLE1.BILLINGPROVIDERNM
-* BY LOWEST RPTPD
BY LOWEST TABLE1.TABLE1.INVCREATIONPERIOD

WHERE TABLE1.TABLE1.INVCREATIONPERIOD LE &INVCREATIONPERIOD.(OR(FIND TABLE1.TABLE1.INVCREATIONPERIOD,TABLE1.TABLE1.INVCREATIONPERIOD IN TABLE1 |FORMAT=I11)).INVCREATIONPERIOD:.;

ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLDDTLS FORMAT ALPHA
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END

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


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Master
posted Hide Post
quote:
Originally posted by RobertF:
Not sure why the fex let it go but the ehtml page did not...


I'm curious. Does the fex still work if you select multiple values in the selection?


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Help! Fex Runs but not when called by HTML Page

Copyright © 1996-2020 Information Builders