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     Calling an adhoc fex in a URL

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Calling an adhoc fex in a URL
 Login/Join
 
Master
posted
Hi everyone

Hope the conference is going well and the slots and tables have all been munificent.

Trying to call an adhoc fex as a URL

This works fine (note adhocfex not adhoc as in some publications)

http://chaos/ibi_apps/WFServlet?IBIF_adhocfex=TABLE%20F...T%20COUNTRY%0D%0AEND

But this does not even tho the referenced URL appears on the bottom of IE as the above
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=COMMON,URL=../ibi_apps/WFServlet?(IBIF_adhocfex='TABLE%20FILE%20CAR%20PRINT%20COUNTRY%0D%0AEND'),$


Instead of the report I get:

(FOC1517) UNRECOGNIZED COMMAND TABLE%20FILE%20CAR%20PRINT%20COUNTRY%0D%0AEND

Help!

Regards

John



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Master
posted Hide Post
This works

In EDASPROF:

LET GO=ON TABLE SET FOC144 NEW # END


Then in the fex or even URL its plain coded.

TYPE=DATA,COLUMN=COMMON,URL=../ibi_apps/WFServlet?(IBIF_adhocfex='TABLE FILE CAR PRINT COUNTRY GO'),$


There must be a better way...



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Virtuoso
posted Hide Post
A new twist on an old theme John. I really wouldn't have thought the # would still work at all!

The real problem is that WF is escaping an escaped string, as it were.

Me, I'd revert back to a bit of js.
SET JSURLS=http://calm/jsdir/somejs.js
DEFINE FILE CAR
request/A100V = 'PRINT COUNTRY CAR';
END
TABLE FILE CAR
PRINT COUNTRY 
      request NOPRINT
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=COUNTRY,JAVASCRIPT=runAdHoc(request),$
ENDSTYLE
END

and the js
function runAdHoc(request){
lineEnd = "\r\n";
adhocCall += "TABLE FILE CAR" + lineEnd;
adhocCall += request + lineEnd;
adhocCall += "ON TABLE PCHOLD FORMAT HTML" + lineEnd;
adhocCall += "END" + lineEnd;
adhocCall = escape(adhocCall);
location.href='http://calm/ibi_apps/WFServlet?IBIF_adhocfex='+adhocCall;
}


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Master
posted Hide Post
Alan

Thanks for the js suggestion - didn't know you could drill to the function directly!

John


Did a bit more work on the idea. Here's the technique so far

Choose SHOWME instead of GO to avoid keyword conflict.

LET SHOWME=ON TABLE SET FOC144 NEW # END


Example of code

-* File cardrill.fex
SET BASEURL=http://chaos/
TABLE FILE CAR
PRINT COUNTRY
	  COMPUTE ADHOC/A500 = 'TABLE FILE CAR PRINT CAR IF COUNTRY EQ ' | COUNTRY | ' SHOWME' ; NOPRINT 

ON TABLE SET STYLE *
TYPE=DATA,COLUMN=COUNTRY,URL=./ibi_apps/WFServlet?(IBIF_adhocfex=ADHOC ),$

END
-RUN


Just like England's world cup dreams, the problem occurs with the Germans. If you drill on W GERMANY the fex fails. If you try to code quotes into your URL

	  COMPUTE ADHOC/A500 = 'TABLE FILE CAR PRINT CAR IF COUNTRY EQ ''' | COUNTRY | ''' SHOWME' ; NOPRINT 



Then the URL is coded by WF as doubled up quote string and will not work. (This is a perennial problem with wf drilldowns - solvable by having " or ' as alternate string delimiters like the REXX language are you listening Gerry -no it would cost too much!)

It all works great as a single URL and I can see the revival of LETs such as TF and TFF as people get back into COMMAND LINE FOCUS [sic] again.

If anyone knows a way round quote problem would appreciate it!



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Virtuoso
posted Hide Post
Oh, hard work.

In your _site_profile (funny how this is never mentioned for months and then twice in 2 days):

-SET &SQUOT='''';

You can also put your LET there. Then your focexec:
DEFINE FILE CAR
request/A100V = 'TABLE FILE CAR PRINT COUNTRY CAR IF COUNTRY EQ &|SQUOT&|COUNTRY&|SQUOT  SHOWME';
END
TABLE FILE CAR
PRINT COUNTRY request NOPRINT
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=COUNTRY,URL=../ibi_apps/WFServlet?(COUNTRY=COUNTRY IBIF_adhocfex=request),$
ENDSTYLE
END


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Master
posted Hide Post
Thanks Alan

That's a 'Why didn't I think of that?' idea.

The only trouble is that our site uses amperautoprompting so that when the fex is offered to the client it is examined for unresolved ampers (site profile wont have been added at this point) and thus prompt code will be generated for &SQUOT!

Does anyone know of a IBIF_ or IBIMR_ variable that will disable amper autoprompt on drilldown?



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Virtuoso
posted Hide Post
John

I am sure that the _site_profile takes over before the autoprompt kicks in, and using the -SET would be okay anyway.

I've just tried with autoprompting and it seems to work fine.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
Just had a thought, try:
DEFINE FILE CAR
request/A100V = 'TABLE FILE CAR PRINT COUNTRY CAR IF COUNTRY EQ &|COUNTRY.QUOTEDSTRING  SHOWME';
END
TABLE FILE CAR
PRINT COUNTRY request NOPRINT
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=COUNTRY,URL=../ibi_apps/WFServlet?(COUNTRY=COUNTRY IBIF_adhocfex=request),$
ENDSTYLE
END

Gets rid of the &SQUOT problem.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Master
posted Hide Post
Hi Alan

Neat solution.

I think that the reason I could not get my version to work was that I tried to embed the reference to country into the compute and you got round this by coding a variable COUNTRY=COUNTRY into the call.

Will try this now.

John



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Master
posted Hide Post
Got it down to this

TABLE FILE CAR
PRINT COUNTRY request NOPRINT
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=COUNTRY,URL=http://electra/ibi_apps/WFServlet?(COUNTRY=COUNTRY IBIF_adhocfex='TABLE FILE CAR PRINT COUNTRY CAR IF COUNTRY EQ &|COUNTRY.QUOTEDSTRING SHOWME'),$
ENDSTYLE
END
-EXIT

Which is put the variables you want to pass to the left in the normal way you would call any fex, but to avoid them being interpreted immediately code

strings as &|ampername.QUOTEDSTRING
numbers as &|ampername

dates require a bit of work since they are passed without delimiters and IF tests generally want the delimiters.

This is a useful technique for simple drilldowns and URL reports but the fex you run is severely limited ie no Defines and DM.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Master
posted Hide Post
This is fast becoming the quest for the holy grail.

There's how to stop amper autoprompt:

TABLE FILE CAR
PRINT COUNTRY
   COMPUTE ADHOC/A500 = 'TABLE FILE CAR PRINT CAR IF COUNTRY EQ &|QUOTE|' | COUNTRY || '&|QUOTE SHOWME' ; NOPRINT
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=COUNTRY,URL=http://electra/ibi_apps/WFServlet?(IBIF_adhocfex=ADHOC  IBIF_wfdescribe=OFF),$
END
-EXIT


Here is the site profile on the client. This code sets the quote.

QUOTE=''
<set> QUOTE(pass)


Alan dont think this code is right to set quote.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Guru
posted Hide Post
And something new in R76x to set a default value and not have it prompted for...

Dialogue Manager variables can be given default values using the -DEFAULT command.
These variables are returned in the XML describe information used for WebFOCUS
parameter prompting features (Amper Autoprompt, MR Publish Utility, HTML Layout, and
ReportCaster Scheduling).
If you want to initialize a variable and prevent it from being used for WebFOCUS parameter
prompting, you can use the -DEFAULTH command to initialize the variable. Variables
initialized with -DEFAULTH are not returned in the XML describe information used for
parameter prompting. Since these variables are not displayed by the parameter prompting
features, they are hidden from the user.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report 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     Calling an adhoc fex in a URL

Copyright © 1996-2020 Information Builders