User Manual

08.14.2024

MANUAL

Developer Feature: Server Script: group.ContainsUser

## Overview Determine whether the "group object" specified in the "[Server Script](/en/manual/table-management-server-script)" contains the "[User](/en/manual/table-management-choices-text-users)" or the "[Dept](/en/manual/table-management-choices-text-depts)" to which the "[User](/en/manual/table-management-choices-text-users)" belongs. ## Syntax ``` group.ContainsUser(userId) ``` ## Return Value If the specified "[User](/en/manual/table-management-choices-text-users)" is included, true is returned. If not, false is returned. If the "[Dept](/en/manual/table-management-choices-text-depts)" to which the specified "[User](/en/manual/table-management-choices-text-users)" belongs is included, true is returned. ## Usage Example The following example checks whether the "[Group](/en/manual/table-management-choices-text-groups)" with group ID 1 contains the logged-in user or the "[Dept](/en/manual/table-management-choices-text-depts)" to which the logged-in user belongs. ##### JavaScript ``` let group = groups.Get(1); if (group.ContainsUser(context.UserId)) { context.Log('contains'); } else { context.Log('not contains'); } ``` ## Related Information <div id="ManualList"><ul><li><a href="/en/manual/table-management-choices-text-depts">Table Management: Editor: Item Detail Settings: Option List: Departments</a><span>08.13.2024 up</span></li> <li><a href="/en/manual/table-management-choices-text-groups">Table Management: Editor: Item Detail Settings: Option List: Group</a><span>08.13.2024 up</span></li> <li><a href="/en/manual/table-management-choices-text-users">Table Management: Editor: Item Detail Settings: Option List: User</a><span>08.13.2024 up</span></li></ul></article> <ul><li><a href="/en/manual/table-management-server-script">Table Management: Server Script</a><span>08.13.2024 up</span></li></ul></article> <ul><li><a href="/en/manual/group">Group Management Function</a><span>10.08.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />
TOP
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.