Syntax
evaluate table NAME [user USER_NAME | system] businessobject ID; |
Or
evaluate table NAME [user USER_NAME | system] relationship ID; |
-
NAME
is the name of the table you want to evaluate.
-
USER_NAME
refers to a person, group, role, or association.
system
refers to a table that is available for system-wide use, and not associated with the session context.
When a table is evaluated, all fields contained within the table for the specified business object ID or relationship ID are listed on your screen. For example, the following command looks for information from a table named “RPO:”
evaluate table RPO businessobject 68104.11481.34617.772; |
This command might produce results similar to the following:
sismuth 9/12/98 62750 TKA Netting Co. Pr.1
Evaluating Tables on Collections of Objects
The
evaluate table
command also allows a
SEARCHCRITERIA
(for more information, see SEARCHCRITERIA Clause) to be given as an alternative to using the
businessobject
or
relationship
keywords:
evaluate table NAME [user USER_NAME | system] [list bus | rel] SEARCHCRITERIA; |
When using a
SEARCHCRITERIA
in an
evaluate table
command, the table columns are evaluated as summary data across the entire collection, returning a single row of information. As such, the column definitions should contain the
set
keyword, and use set-oriented expressions (that is: count, average, maximum, minimum, sum, product, standarddeviation, correlation). Any column definitions that include single business object expressions are ignored.
For example:
add table settable
column label Sum set ' sum ( attribute[Priority] ) '
column label Average set ' average ( attribute[Priority] ) '
column label P1Count set 'count ( attribute[Priority] == 1 ) ';
evaluate table 'settable' set Escalate;
18.0 1.5 6
# Add a column whose expression is a "single bus obj" expression:
mod table settable add column label Priority set ' attribute[Priority] ';
# Which yields exactly the same evaluation:
evaluate table 'MySetTable' set Escalate;
18.0 1.5 6 |
If you want to perform an evaluate table with single business object expressions against each member of a collection, you need to create your own loop.
# Create a list of busId's for the set
set lObject [mql print set escalate select id dump |]
set lBusId [split $lObject \n]
# loop through the list of busId's and run evaluate table for each
# NOTE: use the keyword 'bus' to indicate a bus obj, not a rel ID.
foreach sBusId $lBusId {
set sRow [mql evaluate table 'MyBOTable' bus $sBusId]
puts $sRow
} |
You can optionally include the List Businessobject or List Relationship clause with a SEARCHCRITERIA
to indicate that it applies to 1 or the other.
For information about the SEARCHCRITERIA
clause, see SEARCHCRITERIA Clause.