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]HTML input into variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]HTML input into variable
 Login/Join
 
Gold member
posted
We have created WebFOCUS AdHoc tool for quick data testing - where you give him synonym and are abel to report on top of it. Good old - make everything into BY / SUM / ACROSS variables.
But now we have ended up in situation that end users have started using it even more widly and some Business Analyst know that we have "Relative dates" calculations on WebFocus session. Variables where we calculate different dates for example &THISYRMN (current year/month), &PRV_MNT_END (previouse month end), &YST_LST_YR (yesterday last year) etc. They have used these variables in InfoAssist where statements.
Now these business people are requesting that other not so advanced business users who use this AdHOC tool could be able to use these variables aswell, but now it seems WebFOCUS is not resolving these variables.

Quick example how its built up:
HTML passes &FILTERS variable to report and its value is following "WHERE YEARMONTH EQ '&THISYRMN'";

So everything seems OK but WebFOCUS is now thinking that &THISYRMN is string not variable - my idea was that this is either going to give me prompt or atleast replacing the "&THISYRMN" with correct value.

Anyway If anyone as idea or maybe can give me other idea how to solve this please respond.

Regards,

This message has been edited. Last edited by: <Emily McAllister>,


Release: WebFOCUS 8104, AppStudio: 8105
OS: Windows
Output: HTML,Excel,Active Reports
 
Posts: 89 | Registered: November 19, 2013Report This Post
Virtuoso
posted Hide Post
Does &FILTERS is that variable that the user select ?
From where does &FILTERS is coming from ?
How does &FILTERS is generated ?

It looks for me that it has been generated as of something like this:
-SET &FILTERS = 'WHERE YEARMONTH EQ '''&THISYRMN''';

Try
-SET &FILTERS = 'WHERE YEARMONTH EQ '''&THISYRMN.EVAL''';


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
Gold member
posted Hide Post
quote:
Originally posted by MartinY:

From where does &FILTERS is coming from ?
How does &FILTERS is generated ?

Im building this in JS:
Listbox with "FIELDS" then listbox with "OPERATORS" (EQ,NE,IN, etc) Inputfield or "Listbox" for values. So I take all these 3 html elements together and put it into another listbox what looks like
WHERE <field> <operator> 'value';


Ill give your idea try. Smiler


Release: WebFOCUS 8104, AppStudio: 8105
OS: Windows
Output: HTML,Excel,Active Reports
 
Posts: 89 | Registered: November 19, 2013Report This Post
Virtuoso
posted Hide Post
If you want to pass/add the 'value' itself to your JS string, adding '.EVAL' will not return the value the WF. '.EVAL' is a WF operator, not a JS.

You will need to read the value first and then add it in your JS string.

Something such as (one solution, may have many more):
-* in HTML JS
inVal = '!IBI.AMP.THISYRMN;';

Then you can use inVal to build you JS string.

But if you're building your JS string to be:
FILTERS = 'WHERE <field> <operator> '&THISYRMN.EVAL';'

and it's the string that WF will receive (without quotes), then the '.EVAL' should work.

Will result in
TABLE FILE abc
PRINT ...
BY ...
&FILTERS
END


Where &FILTERS (as per you example) value will be: WHERE YEARMONTH EQ '&THISYRMN.EVAL';
and '&THISYRMN.EVAL' will then be evaluated on execution.


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
How's this:

( untesten, might contain typo's )

  
-PROMPT &TIMEFRAME_UI.(<Current yearmonth,1>,<Previous month end,2>,<Yesterday last year,3>).Timeframe.;

-SET &TIMEFRAME_WHERE = DECODE &TIMEFRAME_UI(
- 1 'WHERE YEARMONTH EQ '&THISYRMN'
- 2 '<whatever where goes with option 2>'
- 3 '<whatever where goes with option 3>');

TABLE FILE <yours>
...
...
&TIMEFRAME_WHERE
END


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report 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]HTML input into variable

Copyright © 1996-2020 Information Builders