Function type:
ELEMENT
Returns the first element in the specified list. This function can be applied to a list of any DGL data types.
Items in the input list can be of any element type except string. For strings, see the functionstm_str_list_first_element
. Assume you have a list of activities assigned to the variableact_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 tocntrl_act
.