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

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | addComment(pageId, comment) | **Package** |  |
> | **Alias** | addComment(commentId, comment) | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Posts a comment on the specified page or adds a reply to the specified comment.

Posts a comment on the specified page or adds a reply to the specified comment.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | pageId | Number | Yes | The ID of the selected page. |
> | comment | String | Yes | Comment that will be posted on the selected page. |

### Or

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | commentId | Number | Yes | The ID of the comment to reply on. |
> | comment | String | Yes | Comment that will be posted on the selected page. |

## Return Type

**Boolean (true/false) **

The return value represents the success of adding the comment. If the routine returns "true" the comment was successfully added.

## Example

```javascript
addComment(11801, "I have added this comment using Power Scripts!");
```

If 11801 is an id of a page, the routine adds a comment to the page with that ID. If 11801 is an ID of a comment, the routine adds a reply to that comment.

## See also

> Macro (contentbylabel)