> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Category membership

> Category membership

This element is used to visualize (and change) which category a user belongs to.

## Configuration

| Setting    | Description                                      |
| :--------- | :----------------------------------------------- |
| label      | UI label                                         |
| categoryId | Loads the membership for the specified category  |
| noWeights  | Whether to show the weights for each user (Bool) |

## Example

```crmscript theme={null}
categoryId = 2
label = Category
noWeights = false
```

## Functions

### getFieldValue(String field)

| Field   | Description                                                     |
| :------ | :-------------------------------------------------------------- |
| members | A comma-separated string with the user ID of each member        |
| user ID | The weight of a user ID<br />**-1** if the user is not a member |

### setFieldValue(String action, Map values)

| Field           | Map keys   | Description                                         |
| :-------------- | :--------- | :-------------------------------------------------- |
| saveMemberships | categoryId | Saves the members to the specified category (by ID) |


## Related topics

- [Update Category Memberships](/en/api/reference/restful/agent/list_agent/update-category-memberships.md)
- [category_membership table](/en/database/tables/category-membership.md)
- [NSTicketCategoryMembershipEntity](/en/automation/crmscript/reference/CRMScript.NetServer.NSTicketCategoryMembershipEntity.md)
- [SuperOffice.WebApi.Data.TicketCategoryMembershipEntity](/en/api/reference/webapi/SuperOffice.WebApi.Data.TicketCategoryMembershipEntity.md)
- [SuperOffice.WebApi.Data.List UpdateCategoryMembershipsRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.List_UpdateCategoryMembershipsRequest.md)
- [SuperOffice.WebApi.Agents.IListAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IListAgent.md)
- [SuperOffice.WebApi.Agents.ListAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ListAgent.md)
