---
title: "setLabels"
canonical: "https://support.appfire.com/space/PSCONF/1460928604/setLabels"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | setLabels(pageId, labels []) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> The routine receives the id of a page and an array of Strings, representing the names of the labels to be added to that page. All previous labels for page are removed.

The routine receives the id of a page and an array of Strings, representing the names of the labels to be added to that page. All previous labels for page are removed.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | pageId | Number | Yes | ID of the selected page for which to set the labels. |
> | labels | String [] | Yes | Labels. |

## Return Type

**Boolean (true/false)**

## Example

```javascript
setLabels(11801, ["my_page", "report", "active_status",]);
```

## See also

> Macro (contentbylabel)