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.
This is one of those times where I have been avoiding asking this question all day as I am so sure if must be something from lesson 101! However myself and a colleague haven't seen the light yet:
We need to extract a value from a field and place it into an &variable so it can be used in our program.
Our report will always return 1 row and we need this one value from the one returned field to go into an &variable.
Currently the only methods I know of sending a value to a variable are when I do a drill down and we can set &parm1=N1, &parm2=N2 etc. We thought (but doubted) that perhaps you could reference a Computed field outside of the report or perhaps perform a -SET in the report, but alas neither of these are valid!
Example:
-DEFAULT &ORDER
TABLE FILE TEST PRINT COMPUTE &ORDER = ORDER_NO; -SET &ORDER = ORDER_NO; WHERE READLIMIT EQ '1'; END -RUN
-TYPE &ORDER
Thanks in advance for your help as always, and I am ready to be embarrassed!
Cheers
Mark
WebFocus 765. iSeries v5r4
Posts: 175 | Location: England | Registered: April 11, 2006
I think perhaps my example confused things as I don't think that is what I am lookig for.
I want the result of a query to be placed into an &variable, so it can be used outside of the report. I'll have another go:
TABLE FILE TEST PRINT ORDER_NO END -RUN
-IF ORDER_NO EQ '123' THEN GOTO REPORT_A; -IF ORDER_NO EQ '456' THEN GOTO REPORT_B; -IF ORDER_NO EQ '789' THEN GOTO REPORT_C;
Now we can't reference a field (ORDER_NO) outside of a report, so I want the contents of the field to be placed into an &variable so we can access the value and use the -IF statements.
Cheers
WebFocus 765. iSeries v5r4
Posts: 175 | Location: England | Registered: April 11, 2006
Our report will always return 1 row and we need this one value from the one returned field to go into an &variable.
TABLE FILE TEST PRINT ORDER_NO ON TABLE SAVE AS ORDER_NO END -RUN -READ ORDER_NO &ORDER.A3. -IF &ORDER EQ '123' THEN GOTO REPORT_A; -IF &ORDER EQ '456' THEN GOTO REPORT_B; -IF &ORDER EQ '789' THEN GOTO REPORT_C;