---
title: "addFilterToFavorites"
canonical: "https://support.appfire.com/space/PSJ/15486291/addFilterToFavorites"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | addFilterToFavorites(ownerName, filterName) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Adds a filter to the user's favorites.

Adds a filter to the user's favorites.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| ownerName | String | Yes | The username of a user |
| filterName | String | Yes | The name of a filter |

## Return Type

**Boolean**

The result of operation

## Example

```
boolean result = addFilterToFavorites("admin", "filter for Agile project");
```

## See also

> Macro (contentbylabel)