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

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | getAllCommentIds(pageId) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Gets all the comment IDs that are already entered on a page.

Gets all the comment IDs that are already entered on a page.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | page ID | Number | Yes | ID of the selected page. |

## Return Type

**Number []**

IDs of the comments on the page.

## Examples

### Example 1

Print Page has 12 comments for example.

```javascript
number [] allComm = getAllCommentIds(11801);
print("Page has " + size(allComm) + " comments";
```

### Example 2

Deletes all comments older than 1 year from page ID 11801.

```javascript
number [] allComm = getAllCommentIds(11801);
interval year = "365d";

for(number c in allComm) {
	CComment comm = getCommentById(c);
	if(comm.created < (currentDate - year)) {
		deleteComment(c)
	}
}
```

## See also

> Macro (contentbylabel)