> ## Documentation Index
> Fetch the complete documentation index at: https://superofficeas-bugfix-ty-screen-designer-paradox.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List interests for a person

> How to list interests for a person with CRMScript.

```crmscript! theme={null}
Void viewPersonInterests(Integer personId) {
  NSPersonAgent personAgent;
  NSPersonEntity p = personAgent.GetPersonEntity(personId);

  NSSelectableMDOListItem[] interests = p.GetInterests();

  for (Integer i = 0; i < interests.length(); i++) {
    printLine(interests[i].GetName());
  }
}

viewPersonInterests(5);
```

<Tip>
  To print only the selected interests, add a condition: `if (interests[i].GetSelected())`.
</Tip>
