30 March 2016

1. Using Inquiries to Retrieve Table Rows

Inquiry objects can be used to retrieve table rows in a flat table. The following table describes the parameters that are available on the Inquiry objects.

Parameter Description Accepted Values/Examples

Arguments

Arguments are used to translate macros within the code.

If the value of an argument is a symbolic name, the macro will be replaced by the actual name. For instance if the value of an argument is "type_Part" and "type_Part" is the symbolic name for a business type named "Part" then the macro will be replaced by "Part".

Also, there are two macros that are reserved by the system. In order to use these macros within the code it is necessary to define them as arguments with a "dummy" value. The reserved macros are:

ID

This macro will be replaced by the value of the objectId parameter at runtime.

USER

This macro will be replaced by the current user’s user name at runtime.

TYPE=type_Part

REL=relationship_EBOM

ID=dummy

USER=xyz

Code

The code parameter specifies the code that will be executed when the Inquiry is evaluated. This is usually an MQL statement like a query or an expansion.

temp query bus "${TYPE}" * * where 'owner == "${USER}"' select id dump |;

expand bus ${ID} from relationship "${REL}" select businessobject id select relationship id dump |;

Format

The format defines how the output from the Inquiry is to be interpreted. The expected output from the Inquiry is a line break separated list of business object IDs and/or relationship IDs.

${OID}

${RELID}~${OID}

Name

The name of the Inquiry object.

MyParts

ECOs

Pattern

The pattern defines how the output that the code produces should be interpreted. The interpreted output is then formatted according to the specified format.

||*|${OID}

||||||${OID}|${RELID}