SW_ADD_PACK_DATA

The SW_ADD_PACK_DATA procedure defines an item of pack data (a field name/value pair) that will be passed to iProcess with the next command procedure that is called.

Syntax

SW_ADD_PACK_DATA (
field_namein varchar2(31),
field_valuein varchar2(255))

where:

field_name is a string that specifies the name of the iProcess field that is to be set.
field_value is a string that specifies the value to be set for field_name.

Note 

Although the value is always passed as a string, it must be in the correct format for the type of field. No validation is performed on either the field name or field value.

Notes

SW_ADD_PACK_DATA allows pack data to be passed to iProcess when a command procedure is called:

You must call SW_ADD_PACK_DATA to specify the pack data immediately before calling the desired command procedure.
A call to SW_ADD_PACK_DATA defines a single item of pack data. If you want to define multiple items of pack data, you must make a SW_ADD_PACK_DATA call for each piece of data before calling the desired command procedure.
The pack data is only valid for the next command procedure that is called.

Examples

In the following example, two SW_ADD_PACK_DATA calls are used to define data values for the F1 and F2 fields, which are passed to iProcess when Case1 is started (using SW_CASESTART). The second SW_CASESTART call, starting Case2, does not have any data values.

begin
SSOLITE_DATA.SW_ADD_PACK_DATA ('F1', 'DataItem1');
SSOLITE_DATA.SW_ADD_PACK_DATA ('F2', 'DataItem2');
SSOLITE.SW_CASESTART ('CUSTREQ', ‑1, ‑1, 'Case1', 'user35', '', casenum, reqid);
SSOLITE.SW_CASESTART ('CUSTREQ', ‑1, ‑1, 'Case2', 'user35', '', casenum, reqid);
end;
/
commit;

If you want to specify pack data for the F1 and F2 fields for Case2 as well, you must call SW_ADD_PACK_DATA again before calling SW_CASESTART, as shown .

begin
SSOLITE_DATA.SW_ADD_PACK_DATA ('F1', 'DataItem1');
SSOLITE_DATA.SW_ADD_PACK_DATA ('F2', 'DataItem2');
SSOLITE.SW_CASESTART ('CUSTREQ', ‑1, ‑1, 'Case1', 'user35', '', casenum, reqid);
SSOLITE_DATA.SW_ADD_PACK_DATA ('F1', 'DataItem1');
SSOLITE_DATA.SW_ADD_PACK_DATA ('F2', 'DataItem2');
SSOLITE.SW_CASESTART ('CUSTREQ', ‑1, ‑1, 'Case2', 'user35', '', casenum, reqid);
end;
/
commit;