Type: Function
Function: USERNAMES
Syntax: USERNAMES("<user id>")
Description: Returns a Keypup user's usernames, one per app they connected, as records carry them in their username fields (e.g. ["jdoe", "John Doe"]).
The user is given by their Keypup user ID, written as text, and must be a member of the team. To find your teammates' IDs, run { companies { nodes { name users { nodes { id firstName email } } } } } on the HQ API of the API Explorer (see Using the API). In the insight designer, the is user filter lets you pick the person by name instead.
It is used to match records on a given user, with fields such as author_username or assignee_usernames. IS_USER, INCLUDE_USER and their opposites are shortcuts for the most common uses.
Usernames are matched as text. A user's usernames are the ones of the apps they connected to their Keypup account (see Managing app identities), one per app. Someone else with the same username in another app, or with the same display name in an app which identifies people by name, such as Jira or Bitbucket, also matches. A user with no app connected matches nothing. The is user filter of the insight designer matches the user's accounts exactly: prefer it when building an insight.
Sample usage:
IN(author_username, USERNAMES("<user id>"))returnstruefor the records the user created.CONTAINS(assignee_usernames, USERNAMES("<user id>"))returnstruefor the records assigned to the user.
