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     [SOLVED] Newbie-need help please. Trying to create a different kind of variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Newbie-need help please. Trying to create a different kind of variable
 Login/Join
 
Member
posted
Here's my scenario:

Need to create a variable from a field in my master file called Line Type. That field contains a number of different values. What I want to do is to collect certain of those values into a new report variable, certain others into another variable, and an ALL that I can pass in on the html for the user to select.

I'm struggling with the documentation on how I can do that. Can anyone help?

Thanks and any help is much appreciated,
Julie

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


WebFOCUS 7.6
AS400, v5r4
All output types
 
Posts: 14 | Registered: November 12, 2007Report This Post
Virtuoso
posted Hide Post
I'm not exactly sure what it is you are trying to accomplish, but basically you can't create a variable from a field. Variables are set using Dialogue Manager which cannot be used with fields. What you probably want to do is write a report getting all of your desired values and ON TABLE SAVE. Then use -READ against the SAVE file to populate those values into the desired variables.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Then again, if you're just looking for field values to populate a drop-down box, they don't need to be variables. You just create a procedure that gets the values you want and call that procedure in the HTML painter for your dynamic list/drop-down box.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
I thought my example was clear, but maybe not.

Field1 contains values = BF, NF, F, S, SN

Need to collect values BF, NF, & F into a variable called FREIGHT or something like that.

Need to collect values S, SN into a variable called PRODUCT or something like that.

Then those two variables, plus ALL will be put into a list box for the users to select.

This is all to prevent the users from having to select so many values up front.

Thanks,
Julie


WebFOCUS 7.6
AS400, v5r4
All output types
 
Posts: 14 | Registered: November 12, 2007Report This Post
Virtuoso
posted Hide Post
The possible solution depend on the type of database.
A SQL database gives other solutions than an flat file (text file) or focus database.

Are you putting the variables into one list box or two boxes?




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
Member
posted Hide Post
One list box. It's an OS2 database - on the AS400.

j


WebFOCUS 7.6
AS400, v5r4
All output types
 
Posts: 14 | Registered: November 12, 2007Report This Post
Virtuoso
posted Hide Post
I think you want to tranlate the variables to either FREIGTH or PRODUCT so if the user clicks on the code BF or S the value FREIGTH or PRODUCT is send to an other application

do I understand that correct?

If so you can use the DECODE formula.




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
Member
posted Hide Post
No.

Let me put it another way.

I'm creating a status list where the Values are one thing and the Display is another.

Can I create multiple values in this way?


WebFOCUS 7.6
AS400, v5r4
All output types
 
Posts: 14 | Registered: November 12, 2007Report This Post
Gold member
posted Hide Post
I always create a DEFINE grouping the field values together before the report, then all you have to do on your HTML is use the defined field as the display field. I have to do that alot with my data.

If a client wants Order Class A, B, and C to be House orders and then Order Class D, E, and F to be Corporate orders then I write a DEFINE:

ORDER_TYPE/A20=IF ORDER_CLASS EQ 'A' OR 'B' OR 'C' THEN 'HOUSE' ELSE IF ORDER_CLASS EQ 'D' OR 'E' OR 'F' THEN 'CORPORATE' ELSE 'UNKNOWN'

You can format the variable to be a multi-select and when you create the drop down on the HTML page, you can select however many order types you want or you can include the option of ALL.

I'm using Order Class because that's my world, but you get the idea. Hope this helps.


PROD: WebFocus 7.6.9 on WinXP
 
Posts: 59 | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Or the other way around - don't worry about handling the values in your HTML page, but instead do it in your code. &PARM1 is set to 'PRODUCT' or 'FREIGHT' from the HTML page. Then:

-SET &VALUES=IF &PARM1 EQ 'PRODUCT' THEN ''''|'S'|''' OR '''|''''|'SN'|'''' ELSE
- IF &PARM1 EQ 'FREIGHT' THEN ''''|'BF'|''' OR '''|'NF'|''' OR '''|'F'|'''' ELSE '''XX''';

Then you could say
WHERE FIELD1 EQ &VALUSE.EVAL ;


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 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     [SOLVED] Newbie-need help please. Trying to create a different kind of variable

Copyright © 1996-2020 Information Builders