Utility Functions : List of Utility Functions : stm_list_first_element

stm_list_first_element

Function type: ELEMENT

Description
Returns the first element in the specified list. This function can be applied to a list of any DGL data types.
Syntax
stm_list_first_element (list, status)
Arguments
 
Items in the input list can be of any element type except string. For strings, see the function stm_str_list_first_element.

 

Status Codes
Example
Assume you have a list of activities assigned to the variable act_list. You know that only one of the activities in the list can be a control activity. To find out which activity this is, include the following statements in your template:

.
.
cntrl_act_list = stm_ac_control_ac (act_list, status);
cntrl_act = stm_list_first_element (cntrl_act_list,
status);

These statements extract the first element (in this case, the only element) of the list and assign this control activity’s ID to cntrl_act.