A
A
Aliy Kunashev2020-02-28 19:57:50
1C-Bitrix
Aliy Kunashev, 2020-02-28 19:57:50

How to filter intranet.structure.list by department?

There is this code

<?$APPLICATION->IncludeComponent("bitrix:intranet.structure.list","",Array(
        "USER_PROPERTY" => Array("FULL_NAME", "EMAIL", "PERSONAL_PHONE", "WORK_POSITION", "UF_DEPARTMENT"),
        "USER_PROPERTY_EXCEL" => Array("FULL_NAME", "EMAIL", "PERSONAL_PHONE", "WORK_POSITION", "UF_DEPARTMENT"),
        "FILTER_NAME" => "users",
        "FILTER_1C_USERS" => "Y",
        "FILTER_SECTION_CURONLY" => "N",
        "NAME_TEMPLATE" => "#NOBR##LAST_NAME# #NAME##/NOBR#",
        "SHOW_ERROR_ON_NULL" => "Y",
        "USERS_PER_PAGE" => "10",
        "NAV_TITLE" => "Сотрудники",
        "SHOW_NAV_TOP" => "Y",
        "SHOW_NAV_BOTTOM" => "Y",
        "SHOW_UNFILTERED_LIST" => "Y",
        "CACHE_TYPE" => "A",
        "CACHE_TIME" => "3600"
    )
);?>


How to filter by department?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aliy Kunashev, 2020-03-06
@askunash

Add
- for one department:
<?$_REQUEST[users_UF_DEPARTMENT] = 58;?>
- for several departments:
<?$_REQUEST[users_UF_DEPARTMENT] = array(58,59);?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question