IWC.FindAppCGIValue: Finding a WebFOCUS Parameter or Variable Value

How to:

The IWC.FindAppCGIValue function finds WebFOCUS parameter or variable values by pairing the parameter or variable name with the WebFOCUS Maintain variable name to which the value is assigned.

Note: IWC.FindAppCGIValue retrieves values, but cannot directly assign the values to a Maintain variable as IWC.GetAppCGIValue does.


Top of page

x
Syntax: How to Find a WebFOCUS Parameter Value
IWC.FindAppCGIValue(name,value);

where:

name

Is the WebFOCUS parameter or variable whose value you are finding.

value

Is the WebFOCUS Maintain variable that receives the value of the WebFOCUS parameter or variable.



Example: Finding a Variable Value From a Launch Form

IWC.findAppCgiValue finds the user name and password values of the IBIC_user and IBIC_pass variables, respectively:

Maintain 
COMPUTE username/A8;
COMPUTE password/A8;
IWC.findAppCgiValue("IBIC_user", username);
IWC.findAppCgiValue("IBIC_pass", password);


Example: Finding Parameterized Data From Excel

IWC.findAppCgiValue finds the values for fields listed in an Excel file:

MAINTAIN FILE car
MODULE IMPORT (webbase2 errors);
Case Top
compute xlsRetail_Cost/a0;
Infer car.ORIGIN.COUNTRY car.COMP.CAR car.CARREC.MODEL
car.BODY.BODYTYPE car.BODY.RETAIL_COST into car_stack;
car_stack.FocCount=1;
car_stack.FocIndex=1;
iwc.findAppCgiValue("COUNTRY",car_stack.country);
iwc.findAppCgiValue("CAR",car_stack.car);
iwc.findAppCgiValue("MODEL",car_stack.model);
iwc.findAppCgiValue("BODYTYPE",car_stack.bodytype);
iwc.findAppCgiValue("RETAIL_COST",xlsRetail_Cost);
car_stack.retail_cost = xlsRetail_Cost;
update car.BODY.RETAIL_COST from car_stack;
EndCase
END

WebFOCUS