EOAW_EMC:utils Class Methods

This section describes utils class methods.

Syntax

getAppRS(&msgRS)

Description

This method provides a single point from which to retrieve the applications rowset from the message definition rowset, as the message definition should have the application rowset starting at level 2. Given the rowset object representing your entire message, this rowset will return just the part of the overall rowset representing your transaction.

Parameters

Parameter

Description

&msgRS

The rowset object representing your entire message.

Returns

Rowset.

Syntax

getErrorCodesRS(&msgRS)

Description

This method provides a single point from which to retrieve the error codes rowset from the message definitions rowset.

Parameters

Parameter

Description

&msgRS

The rowset object representing your entire message.

Returns

Rowset.

Syntax

getPromptsRS(&msgRS)

Description

This method provides a single point from which to retrieve the prompts rowset from the message definition's rowset, as the message definition should have the prompts rowset starting at level 2.

Parameters

Parameter

Description

&msgRS

The rowset object representing your entire message.

Returns

Rowset.

Syntax

getRowFromPath(&startingRS, &path, &createIfNull)

Description

This method is useful for error processing. When your message expects a date or number field to be returned by the user, but the EMC cannot cast the value it gets back into one of those data types, it will put an error code in the exceptions stack. Along side that code in the stack, will be a row path. A row path is the path you need to follow to get to a specific row in a rowset. It follows the format (n)SCROLLNAME[(n)...] where n is a row number and SCROLLNAME is the name of the record comprising the rowset you want to retrieve in that row. When you get an error of one of these 2 types, you can call this method, passing in your message rowset, the rowpath in the error stack, and false. You will be returned the exact row where the error occurred (the name of the record and field are also in the error stack.

Parameters

Parameter

Description

&startingRS

The rowset from which to start searching for a row, as rowset.

&path

Path to the desired row, as string. Syntax - (n)[SCROLLNAME(n)...] where n is the row in the scroll preceding it. The rowset preceding the first n is &startingRS.

&createIfNull

If set to true, the method will insert as many rows as necessary to retrieve the row successfully. If set to false and the row is not present, an exception will be thrown.