SUBSCRIPTION_USERS_LIST ()

SUBSCRIPTION_USERS_LIST ()

SUBSCRIPTION_USERS_LIST([role], [team])

API Version

2.7.9 and higher

Returns a list of PROFESSIONALS that are member of the context ADMISSION's SUBSCRIPTION.

It is possible to filter the list of PROFESSIONALS by specifying a ROLE and or TEAM

This FORMULA is intended to be use as a generator of options for ITEMS of type RADIO BUTTON, CHECKBOX or SELECT (see ITEM TYPE and #ELEMENT:CHOICE). To generate options dynamically this formula should be placed in the "OPTIONS" field of an ITEM of type RADIO BUTTON, CHECKBOX or SELECT.


Input Parameters

Parameters

Type

Default

Required

Description

Parameters

Type

Default

Required

Description

role

Number



Yes

ROLE to use as filter. Only the PROFESSIONALs with the requested ROLE will be returned

team

Number/String



Yes

TEAM to use as filter. Only the professionals belonging to the TEAM requested will be returned. Note that the TEAM must be a member of the SUBSCRIPTION

Two types of value are accepted

  • Numeric value: a TEAM reference

  • String value: a TEAM CODE

Return value

Returns an array of options. Each item of the array is another array containing the following properties:

  • ID: An unique identifier for the option

  • DESC: Name of the professional

  • VALUE: ID of the professional

Return value example:

[ ["ID" => 12567, "DESC" => "John Smith", "VALUE" => 12567], [ID" => 76667, "DESC" => "Rebecca Grant", "VALUE" => 76667] ]

Execution

Always. Calculated on-the-fly whenever an ITEM of a FORM is changed (by means of form_set_answer(), or when the FORM is opened

Examples

Formula

Description

Formula

Description

SUBSCRIPTION_USERS_LIST()

Return a list with all members of the SUBSCRIPTION

SUBSCRIPTION_USERS_LIST(24)

Return a list with all members of the SUBSCRIPTION with ROLE "CASE MANAGER"

SUBSCRIPTION_USERS_LIST(24, 309)

Return a list with all members of the SUBSCRIPTION with ROLE "CASE MANAGER" in a TEAM with reference 309

SUBSCRIPTION_USERS_LIST(24, "BEI_1")

Return a list with all members of the SUBSCRIPTION with ROLE "CASE MANAGER" in a TEAM with TEAM CODE "BEI_1"