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     Drilldown using Javascript - Issue with comma.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Drilldown using Javascript - Issue with comma.
 Login/Join
 
Platinum Member
posted
Hi,

I am using JAVASCRIPT to drilldown from one fex to another. In the drilldown a parameter has to be passed which has comma in it and that is a column in the table file and hence I cannot put it within quotations.

E.g.: The data is like 'Jan, 2007' in a column MONTH.


GRAPH FILE TABLENAME
SUM COL1 COL2
ACROSS MONTH
ON GRAPH SET STYLE *
TYPE=DATA, COLUMN=COL1, JAVASCRIPT=func(MONTH), $
END

The above code will not work properly as the column MONTH is having a ',' in it. What is the solution to pass this value correctly?

Thanks for your help.

Regards,
Cyril Joy.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Virtuoso
posted Hide Post
Cyril,

Could you pass the value of MONTH with a different format, say A6MYY? If yes, DEFINE another field AMONTH/A6MYY = MONTH and in the program have:
ACROSS MONTH ACROSS AMONTH NOPRINT
...
TYPE=DATA, COLUMN=COL1,JAVASCRIPT=func(AMONTH)


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
But i think in a graph, if the value is defined as NOPRINT, it will not be allowed to drill down. Am I right?


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Virtuoso
posted Hide Post
Cyril

I'm also not sure if you can give a second across in a graph.
What you can do is use only the second across (AMONTH) and use some extra settings in the graph to display the AMONTH value in a different way.
You need to add some java settings that as far as I know are not clickable via the gui.
Look in the manual to obtain functions like setLevelDateFormat()
setLevelBorderColor(getTimeScaleLevel(1), new Color (255,0,0));
setLevelBorderColor(getTimeScaleLevel(0), new Color(0,255,0));
setLevelBorderColor(getTimeScaleLevel(2), new Color(0,0,255));
setLevelTextColor(getTimeScaleLevel(1),new Color (255,0,0));
setLevelTextColor(getTimeScaleLevel(0),new Color(0,255,0));
setLevelTextColor(getTimeScaleLevel(2),new Color(0,0,255));


Frank




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Platinum Member
posted Hide Post
Is there any way to escape the special characters when using with Javascript function?


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Virtuoso
posted Hide Post
Cyril

When you hold the mouse over the drill down area, are you getting something like:

javascript:func(Jan,2007);

appearing in the status bar?

If so, then the js will be receiving this as 2 parameters not one, so you should use:

function func(a,b)

where variable a will be 'Jan' and variable b would be '2007', so you could then concatenate a and b. Then there is no need to escape as the comma is part of the variable.

The escape character in js is the \, but should not be needed.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
To escape a value in JavaScript:

lutCode = escape(CODE);


Here is some interesting help on the escape function:

http://www.w3schools.com/jsref/jsref_escape.asp


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
The values for example say
Jan, 2007
Feb, 2007
Mar, 2007 etc are coming from database or is in a column named MONTH.

I am using this column in a JAVASCRIPT drillldown from fex.

GRAPH FILE TABLENAME
SUM COL1 COL2
ACROSS MONTH
ON GRAPH SET STYLE *
TYPE=DATA, COLUMN=COL1, JAVASCRIPT=func(MONTH), $
END

When the code is executed, it is simply giving a javascript error when clicked on COL1.


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Virtuoso
posted Hide Post
Cyril

Where is your javascript loaded into the output page?

What is the javascript error you get?

What does the Status bar show when holding your mouse over the drill down column?

Basically, on a Graph you have to use the
java api calls to invoke javascript correctly, which can be a bit messy. Can you not achieve your objective callling a focexec directly or URL.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report 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     Drilldown using Javascript - Issue with comma.

Copyright © 1996-2020 Information Builders