$entinfo

Return information about an entity.

$entinfo(Entity,Topic)

Example: vFIelds = $entinfo($entname, "paintedfields")

Parameters

Parameters
Parameter Data Type Description
Entity String Entity name
Topic String Valid topic name (see Topics and their Returned Values ). The topic name is not case-sensitive; you can use uppercase or lowercase letters, or any combination of these, to increase readability.

Return Values

Topics and their Returned Values

Topic Name

Return Value
DATAACCESS Letter D or E, indicating whether the Data Access property of the entity is set to D (Via DBMS path) or Y (Via Entity Service.
DBMSPATH The three-letter path abbreviation for the DBMS path assigned to Entity (for example "ORA") or the string "Not in Database".
INNER A list of entities painted directly inside Entity. An empty string ("") is returned if there are no inner entities.
OBJECTSERVICE The entity service name defined for the requested object Entity. An empty string ("") is returned if Entity is not an object entity.
OUTER The name of the outer entity. An empty string ("") is returned if Entity is the outer entity.

This replaces the function $outer.

PAINTEDFIELDS A list of component fields within this entity.
SUPERTYPE The name of the supertype entity for Entity. An empty string ("") is returned if there is no supertype (that is, Entity is the supertype.)

An empty string ("") is returned if an error occurred, in which case, $procerror contains a negative value that identifies the exact error.

Values of $procerror Commonly Returned Following $entinfo
Value  Error constant Meaning
-1102 UPROCERR_ENTITY The entity name provided is not a valid name or the entity is not painted on the component.
-1110 UPROCERR_TOPIC Topic name not known.

Use

Allowed in all component types.

Description

The $entinfo function is especially useful in writing generalized operations and global ProcScript entries where the information needs to be determined at run time rather than built into the component.

Setting Field Colors of the Current Entity

The following example sets the color for all fields of the current component entity to yellow letters on a purple background.

operation MAKE_COLORFUL
variables
   string LIST_OF_FIELDS
   string FIELD
endvariables

LIST_OF_FIELDS = $entinfo($entname, "PAINTEDFIELDS")
while (LIST_OF_FIELDS != "")
   getitem FIELD, LIST_OF_FIELDS, -1
   ; give this field bright colors
   fieldvideo FIELD, "COL=53"
   delitem LIST_OF_FIELDS, -1
endwhile
end