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     Example of Select a Field/Select an operand/Enter value

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Example of Select a Field/Select an operand/Enter value
 Login/Join
 
Platinum Member
posted
Can anyone offer code or suggestions on how to create a report that allows the user to Select a field, Select an operand and then enter a value that will then be used as a WHERE selection inside the report.

Filter 1 - Drop-down could contain Car, Country, Model, Body

Select an operand - EQ, GT, GE, LT, LE, LIKE

Enter value - If user selects Car from Filter 1 this could contain JAGUAR, Country it could contain Japan.


I've worked a little with amper variables but I don't know how to put them into a Where - and maybe that isn't how this needs to be done... at this point I'm not sure what to do ......

Any and all help is always appreciated.
 
Posts: 132 | Location: Kansas | Registered: November 12, 2003Report This Post
Expert
posted Hide Post
-DEFAULT &MYFLD = 'CAR' ;
-DEFAULT &MYREL = 'EQ' ;
-DEFAULT &MYVAL = 'JAGUAR';
-SET &MYFILTER = 'WHERE ' | &MYFLD | ' ' | &MYREL | ' ' | &MYVAL ;

TABLE FILE CAR
..do stuff
&MYFILTER.EVAL
END
..the eval may not be necessary. it isn't in my site, but might be in yours.
But the trick is gonna be in your launch page.
Java Script arrays...if your use picks 'CAR', then the 3rd dd list should switch to a car list
and the 2nd dd list should switch to just 'EQ'.
That's the fun part.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Thanks susannah.... I was just going to force them to put something in because I don't know how to populate the box based upon the filter either. I know there is a "chaining" option. This is definitely a learn as I go project..... I wish we had another reference on Focal Point for code examples. There is so much you can do if you just know it's out there ...... and I stand in awe of those of you who are more experienced and code java inside your fexes - I can barely get my basic reports out.....

Thanks again
 
Posts: 132 | Location: Kansas | Registered: November 12, 2003Report This Post
Platinum Member
posted Hide Post
I have susannah's example working but now I'd like to fix the filter1 to work like an ampervariable field..... - is this possible..? or should I just hard code the field names in my Resource Layout...?

Thanks
 
Posts: 132 | Location: Kansas | Registered: November 12, 2003Report This Post
Member
posted Hide Post
I asked a very similar question about a week ago and receieved a couple of useful answers which almost, but not quite, fixed the problem.

In the end though I used a data driven solution to this problem. For the purposes of populating the list boxes on my report launch page I created one table which combined all the data from the various lookup tables that the user could potentially select. The table simply contains two columns, the first identifies the category that the user could select - CAR or MODEL etc - the second column gives the corresponding data value. So, for example, if your CAR table had 5 records and the MODEL table had 20 records this new table would contain 25 records. Make sense ?

I then add two chained list boxes to the launch page, the first using column 1 as it's data source the second using column 2 as it's data source. Because the list boxes are chained together as the user selects a value from the first list box the values in the second will be filtered accordingly.

This only gives you references to supply to your parameterised report - obviously then you refer back to the original lookup tables.

Possibly not the smartest solution in the world but this problem frustrated me for ages and this was the only fix I could get to work.
 
Posts: 7 | Location: London, England | Registered: February 16, 2005Report 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     Example of Select a Field/Select an operand/Enter value

Copyright © 1996-2020 Information Builders