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.
I am trying to get the value of a field passed from my hold file to display on the HTML document. I know it can be done if the value is a constant by using !IBI.AMP.FOO, where FOO is the defined Amper Variable. When I try to set FOO from a value in my table it will not pass.
Example:
TABLE FILE FOO COMPUTE FOO_PCT/D3.1% = SUM.FOO.FOO_ONE / SUM.FOO.FOO_TWO * 100; ON TABLE HOLD AS FOO_HOLD FORMAT BINARY END -RUN
If I set an Amper Variable named &TEST to the value of FOO_PCT ( -SET &TEST = FOO.FOO_PCT and pass it to my HTML using !IBI.AMP.FOO_PCT, the text that is displayed is "FOO.FOO_PCT", but I am looking to have it display whatever value FOO_PCT calculates out to, say 2.2%.
Is this possible? I am completely lost and trying to see if I am banging my head against a wall for nothing.
John
EDIT - I have an example of what I am trying to do using the wf_lite data set if that would be any less confusing, but it is erroring out so I don't think it would be helpful.This message has been edited. Last edited by: FP Mod Chuck,
John Coleman WEBFocus 8.1.05 Windows 7
Posts: 20 | Location: Rensselaer, NY | Registered: May 20, 2016
HOLD will not maintain the formatting masks, only the raw numbers. But to populate an &VAR with the data from this request, you could use -READFILE. Once the numbers are in &variables you can pass them to anything you want. Something like this:
-DEFAULTH &FOO_PCT=;
-DEFAULTH &RETAIL_COST=;
-DEFAULTH &DEALER_COST=;
SET HOLDLIST=PRINTONLY
SET ASNAME=ON
TABLE FILE CAR
SUM RETAIL DEALER
COMPUTE FOO_PCT/D12.2 = (RETAIL-DEALER)*100/RETAIL;
ON TABLE HOLD
END
-RUN
-READFILE HOLD
-TYPE &RETAIL_COST &DEALER_COST &FOO_PCT
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
I did find that one of the issues I am running into. I found some documentation about using a -READ statement after the hold table to populate the variable. The issue I am finding now is that the formats have to match and they cannot have a '.' in them. So the code becomes:
TABLE FILE FOO COMPUTE FOO_PCT/I5 = SUM.FOO.FOO_ONE / SUM.FOO.FOO_TWO * 100; AS 'FOO_PCT' ON TABLE HOLD AS FOO_HOLD FORMAT BINARY END -RUN
-READ FOO_HOLD &FOO_PCT.I5 -TYPE &FOO_PCT
This -READ passes the value into &FOO_PCT but the formats must match and not have a decimal (At least to my research knowledge thus far). So the code above works and gives me an Integer, say 30, but the actual value should be in D3.1%L, say 30.9%. If the format is switched to D3.1%L the code breaks and it requests a value for &FOO_PCT.
So thanks for the help but back to the drawing board, if anyone has any other ideas, I'm open.
@Hallway - I will try to put that up as soon as I work n this a few minutes more.
@BabakNYC - That code was not giving me a value, but I will keep poking at it.
John Coleman WEBFocus 8.1.05 Windows 7
Posts: 20 | Location: Rensselaer, NY | Registered: May 20, 2016
-DEFAULTH &MSRP_QS = 0;
-SET DMPRECISION = 2;
SET HOLDLIST = PRINTONLY
SET ASNAMES = ON
SET CENT-ZERO = ON
TABLE FILE WF_RETAIL_LITE
SUM
COMPUTE Sold_per_MSRP/D12.2 = WF_RETAIL_LITE.WF_RETAIL_SALES.MSRP_US / WF_RETAIL_LITE.WF_RETAIL_SALES.QUANTITY_SOLD; AS 'MSRP_QS'
ON TABLE HOLD AS TEST FORMAT BINARY
END
-RUN
-READFILE TEST
-TYPE &|MSRP_QS = &MSRP_QS &MSRP_QS.TYPE
-HTMLFORM BEGIN NOEVAL
<style>
* {
font-family: 'Trebuchet MS','Lucida Sans Unicode','Lucida Grande','Lucida Sans',Arial,sans-serif;
}
</style>
<h1>The value for &MSRP_QS is: !IBI.AMP.MSRP_QS; </h1>
-HTMLFORM END
This message has been edited. Last edited by: Hallway,
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015