Focal Point
[SOLVED] Store MIN.Field Value as a Parameter value to be used later on down the line

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9787041676

May 13, 2015, 06:34 PM
SAI_Ryan
[SOLVED] Store MIN.Field Value as a Parameter value to be used later on down the line
As the title describes I have a set of data in a compound document that will be used in one report. In a completely set of data I need to use a min value in a computed field. Is it possible to store that value in a parameter so my computed field later on can be

COMPUTE CUSTOM/D12 = &MINPARAM / Field

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


WebFOCUS 8
Windows, All Outputs
May 14, 2015, 08:16 AM
MartinY
This can be a way from the moment the original value exist in a table/file:
TABLE FILE CAR
SUM MIN.RETAIL_COST AS MINRCST
ON TABLE HOLD AS HLD FORMAT BINARY
END
-RUN
-READFILE HLD

-TYPE &MINRCST


But without knowing how does your value is stored, difficult to gives you correct solution.


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
May 14, 2015, 10:28 AM
SAI_Ryan
Martin

That code does not seem to be setting the variable as desired. That as statement doesn't seem to be transmitting to variable.

TABLE FILE AITRANS
SUM
MIN.Net_Worth AS NETWORTH
WHERE Client_Number = 1111111
ON TABLE HOLD AS HLD FORMAT BINARY
-RUN
0 NUMBER OF RECORDS IN TABLE= 7 LINES= 1
-READFILE HLD
-TYPE
END


WebFOCUS 8
Windows, All Outputs
May 14, 2015, 10:35 AM
MartinY
The End command is at the wrong place and you must specify what to display (-TYPE)

TABLE FILE AITRANS
SUM MIN.Net_Worth AS NETWORTH
WHERE Client_Number = 1111111
ON TABLE HOLD AS HLD FORMAT BINARY
END
-RUN
-READFILE HLD
-TYPE &NETWORTH



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
May 14, 2015, 10:48 AM
SAI_Ryan
I had the &NETWORTH in my code the variable was just blank in the output code.

Okay so once i added ON TABLE SET ASNAMES ON it worked.

Thank you thank you thank you.

Learn something new everyday with this program.


WebFOCUS 8
Windows, All Outputs