# Configure Comment Panel

**URL:** <https://forum.inductiveautomation.com/t/configure-comment-panel/6815>\
**Category:** Ignition\
**Created:** [July 4, 2013, 9:01am UTC](https://forum.inductiveautomation.com/t/configure-comment-panel/6815 "2013-07-04T09:01:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niks](https://avatars.discourse-cdn.com/v4/letter/n/e19b73/32.png) [@Niks](https://forum.inductiveautomation.com/u/Niks)\
**Post date:** [July 4, 2013, 9:01am UTC](https://forum.inductiveautomation.com/t/configure-comment-panel/6815/1 "2013-07-04T09:01:51Z")

</div>

Hi,

I want to configure Comment panel in our project.  
we have two user 1.Admin and 2.Operator

Does it require any scripting if yes please suggest in solution.

---

<div class="post-metadata">

**Author:** ![Ron.Lor](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@Ron.Lor](https://forum.inductiveautomation.com/u/Ron.Lor)\
**Post date:** [July 5, 2013, 5:28pm UTC](https://forum.inductiveautomation.com/t/configure-comment-panel/6815/2 "2013-07-05T17:28:15Z")

</div>

How do you want to configure the comments panel? Do you want two different views for the comments panel or do you just want to be able to post comments under admin and operator? the comments component already detects what user is logged in and posts comments under the user that is logged in.

---

<div class="post-metadata">

**Author:** ![Niks](https://avatars.discourse-cdn.com/v4/letter/n/e19b73/32.png) [@Niks](https://forum.inductiveautomation.com/u/Niks)\
**Post date:** [July 22, 2013, 10:00am UTC](https://forum.inductiveautomation.com/t/configure-comment-panel/6815/3 "2013-07-22T10:00:28Z")

</div>

I want only post comments under admin and operator.

---

<div class="post-metadata">

**Author:** ![Brett\_Yeomans](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Brett\_Yeomans](https://forum.inductiveautomation.com/u/Brett_Yeomans)\
**Post date:** [July 23, 2013, 8:30pm UTC](https://forum.inductiveautomation.com/t/configure-comment-panel/6815/4 "2013-07-23T20:30:27Z")

</div>

First you need a table in SQL for the data.  
I have this structure in table ‘notes2’:

ColumnName DataType  
id - INT  
username - VARCHAR(255)  
notetext - VARCHAR(255)  
attachmentname - VARCHAR(255)  
attachment\_data - LONGBLOB  
IsSitcky - Bit  
Timestamp - TIMESTAMP

On the ‘Comments Panel’ Insert Query1 is:`INSERT INTO Notes2 (Notetext, username, TimeStamp, Attachment_data, attachmentname, isSticky) VALUES (?, (SELECT username FROM auth_Users WHERE Username='%s'), CURRENT_TIMESTAMP, ?, ?, ?)`

Note: auth\_Users in the above refers to where my Users are stored for this project, yours would be xxxx\_Users depending on what is set in the ‘Table Prefix’ box in the Users,Roles set up in the gateway.

Insert Query2 is empty

Delete Query is:`DELETE FROM Notes2 WHERE Id=%d`

Unstick Query is:`UPDATE Notes2 SET isSticky=0 WHERE Id=%d`

Download Attachment Query is:`SELECT Attachment FROM Notes2 WHERE Id=%d`

Data is a SQL Query:`SELECT Id,Username,Timestamp,NoteText,AttachmentName,isSticky AS sticky
FROM Notes2`

No scripting for this just a matter of setting the queries to match your table. Hope this helps.

---

<div class="post-metadata">

**Author:** ![Niks](https://avatars.discourse-cdn.com/v4/letter/n/e19b73/32.png) [@Niks](https://forum.inductiveautomation.com/u/Niks)\
**Post date:** [August 26, 2013, 12:45pm UTC](https://forum.inductiveautomation.com/t/configure-comment-panel/6815/5 "2013-08-26T12:45:34Z")

</div>

Yes…Done…Thank You Very Much Brett…

---

<div class="post-metadata">

**Author:** ![Niks](https://avatars.discourse-cdn.com/v4/letter/n/e19b73/32.png) [@Niks](https://forum.inductiveautomation.com/u/Niks)\
**Post date:** [August 27, 2013, 5:07am UTC](https://forum.inductiveautomation.com/t/configure-comment-panel/6815/6 "2013-08-27T05:07:25Z")

</div>

Thanks for your reply Brett,

I am little keen to know how to configure two different views for the comments panel.

---

<div class="post-metadata">

**Author:** ![Brett\_Yeomans](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Brett\_Yeomans](https://forum.inductiveautomation.com/u/Brett_Yeomans)\
**Post date:** [September 1, 2013, 8:36am UTC](https://forum.inductiveautomation.com/t/configure-comment-panel/6815/7 "2013-09-01T08:36:21Z")

</div>

What two views do you want?
