Focal Point
Adding a "calculated value" to a drop down list

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

October 11, 2007, 11:02 AM
Luiz De Assis
Adding a "calculated value" to a drop down list
Hello!
I've created a drop down list on my HTML page using a flat file to populate it. My BY field is called BU_EVP, which displays the following business units:
GRPBMG
GRPWHL
GRPCFO
GRPNETWORK
GRPTOTALCP
GRP_CONSUMER

I'm trying to add a new business unit called OTHER_BU = TOTAL_COMPANY - (GRPBMG + GRP_CONSUMER + GRPWHL), and make it part of my drop down list, which would look like this:
GRPBMG
GRPWHL
GRPCFO
GRPNETWORK
GRPTOTALCP
GRP_CONSUMER
OTHER_BU
Is it possible? Appreciate any help I can get. Thanks
Luiz
October 11, 2007, 05:35 PM
N.Selph
I guess I am not clear what your problem is. You can append a record to a flat file with
 
FILEDEF flatfile DISK filename.ext (APPEND

After that you can write the one required value to the flat file with
-WRITE flatfile OTHER_BU

Or if you already have wrapped the values with HTML code in the flat file you can use something like

-WRITE flatfile <OPTION VALUE="OTHER_BU" SELECTED>OTHER_BU</OPTION>


In either case you are going to have to deal with the calculation in the WebFOCUS code after you get the value from the HTML page.
You just deal with the value "OTHER_BU" differently than any other value you get.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)