# Comments Panel

**URL:** <https://forum.inductiveautomation.com/t/comments-panel/4041>\
**Category:** Ignition\
**Created:** [February 22, 2012, 2:48pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041 "2012-02-22T14:48:41Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![tailfire](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tailfire](https://forum.inductiveautomation.com/u/tailfire)\
**Post date:** [February 22, 2012, 2:48pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/1 "2012-02-22T14:48:41Z")

</div>

I am looking for any tips or tutorials on how to configure the “comments panel” components.  
I set up a few tables in the database that correspond with “what I thought” where used by this component. I am missing something. Was hoping someone out here has used this and had some notes they could share.

---

<div class="post-metadata">

**Author:** ![tailfire](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tailfire](https://forum.inductiveautomation.com/u/tailfire)\
**Post date:** [February 22, 2012, 2:52pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/2 "2012-02-22T14:52:43Z")

</div>

WOW I found the documentation  
[inductiveautomation.com/supp … syntax.htm](http://www.inductiveautomation.com/support/usermanuals/ignition/index.html?basic_syntax.htm)

I should read this first… ![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:")

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [February 22, 2012, 9:57pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/3 "2012-02-22T21:57:23Z")

</div>

Good, let us know if you run into any problems.

---

<div class="post-metadata">

**Author:** ![AlexW](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@AlexW](https://forum.inductiveautomation.com/u/AlexW)\
**Post date:** [February 23, 2012, 1:33am UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/4 "2012-02-23T01:33:53Z")

</div>

its a long road trying to find the perfect turbo encabulator!

---

<div class="post-metadata">

**Author:** ![Dravik](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@Dravik](https://forum.inductiveautomation.com/u/Dravik)\
**Post date:** [February 23, 2012, 2:52am UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/5 "2012-02-23T02:52:32Z")

</div>

Call me old fashioned, but I like the feel of the retro encabulator better.  
Of course, neither of them beat a good interocitor… sigh.

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [February 23, 2012, 6:17pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/6 "2012-02-23T18:17:27Z")

</div>

Comments panel in the manual linked below:

[inductiveautomation.com/supp … spanel.htm](http://www.inductiveautomation.com/support/usermanuals/ignition/tables_pmicommentspanel.htm)

---

<div class="post-metadata">

**Author:** ![Greg.Buehler](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Greg.Buehler](https://forum.inductiveautomation.com/u/Greg.Buehler)\
**Post date:** [February 23, 2012, 7:01pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/7 "2012-02-23T19:01:27Z")

</div>

Just to add on to this, here is an example intended to be indexed on a tag path.

MySQL

```auto
CREATE TABLE IF NOT EXISTS `notes` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `UserName` varchar(45) NOT NULL,
  `TimeStamp` datetime NOT NULL,
  `NoteText` text NOT NULL,
  `TagName` varchar(45) NOT NULL,
  `IsSticky` tinyint(3) unsigned NOT NULL,
  `Attachment` longblob DEFAULT NULL,
  `AttachmentName` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=22 ;
```

MS SQL (assumes the database is called sqltags)

```auto
USE [sqltags]
GO

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[notes]') AND type in (N'U'))
DROP TABLE [dbo].[notes]
GO

USE [sqltags]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[notes](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserName] [nvarchar](50) NOT NULL,
	[TimeStamp] [datetime] NOT NULL,
	[NoteText] [ntext] NOT NULL,
	[TagName] [nvarchar](255) NOT NULL,
	[IsSticky] [int] NOT NULL,
	[Attachment] [varbinary](max) NULL,
	[AttachmentName] [nvarchar](50) NULL,
 CONSTRAINT [PK_notes] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO
```

[Alarm Notes.vwin](https://us1.discourse-cdn.com/inductiveautomation/original/1X/71bf06d3478a7ee32616b6313a2cd2cb10e042a1.vwin) (10.3 KB)

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [February 24, 2012, 1:09pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/8 "2012-02-24T13:09:52Z")

</div>

Nice example. This is very helpful. ![:thumb_left:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e26afb081ddde6df016df6ee49159cf56aaca688.gif ":thumb\_left:")

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [February 24, 2012, 1:27pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/9 "2012-02-24T13:27:45Z")

</div>

I ended up building my own. We needed to have dropdowns with preconfigured comments, that way we can track calibrations and search for other stuff without having to worry about typos. I also set it up so that the user can use the current timestamp or use a calender component to enter in a manual timestamp if they dont get around to entering the comment in for a few days.

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [February 24, 2012, 1:54pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/10 "2012-02-24T13:54:56Z")

</div>

One problem I found with this example... if you add a note with an attachment it works fine. If you add a note without an attachment it won't accept a null in the Attachment column and throws up an error.

> [@](#):
>
> Implicit conversion from data type varchar to varbinary(max) is not allowed. Use the CONVERT function to run this query.

Maybe this is just a sql2005 thing? Not sure how to get around this as the Attachment column is set to accept nulls.

---

<div class="post-metadata">

**Author:** ![Greg.Buehler](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Greg.Buehler](https://forum.inductiveautomation.com/u/Greg.Buehler)\
**Post date:** [February 24, 2012, 4:17pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/11 "2012-02-24T16:17:37Z")

</div>

Probably just need to change the table schema to fit your needs. This was tested using MySQL. The MS SQL table hasn’t actually been used/tested yet.

---

<div class="post-metadata">

**Author:** ![bassa](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bassa](https://forum.inductiveautomation.com/u/bassa)\
**Post date:** [April 25, 2012, 10:24am UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/12 "2012-04-25T10:24:49Z")

</div>

I having this problem as well (SQL2008 db) and still working around without a solution.

Another question, how can we getting DataSet of Comments panel while adding a new Note?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [April 25, 2012, 3:12pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/13 "2012-04-25T15:12:34Z")

</div>

To get the attachments to work with MS SQL Server you can set the INSERT QUERY 1 to the following:`INSERT INTO Notes (Note, Username, TStamp, Attachment, Filename, Sticky) VALUES (?, '%s', CURRENT_TIMESTAMP, CAST(? AS VARBINARY(MAX)), ?, ?)`Note the CAST(? AS VARBINARY(MAX)).

---

<div class="post-metadata">

**Author:** ![bassa](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bassa](https://forum.inductiveautomation.com/u/bassa)\
**Post date:** [April 26, 2012, 2:40am UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/14 "2012-04-26T02:40:21Z")

</div>

Thank you Travis, the solution fixed my problem. 🙂

> [@Travis.Cox](#):
>
> To get the attachments to work with MS SQL Server you can set the INSERT QUERY 1 to the following:`INSERT INTO Notes (Note, Username, TStamp, Attachment, Filename, Sticky) VALUES (?, '%s', CURRENT_TIMESTAMP, CAST(? AS VARBINARY(MAX)), ?, ?)`Note the CAST(? AS VARBINARY(MAX)).

---

<div class="post-metadata">

**Author:** ![ematschke](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ematschke/32/7544_2.png) [@ematschke](https://forum.inductiveautomation.com/u/ematschke)\
**Post date:** [December 31, 2019, 7:29pm UTC](https://forum.inductiveautomation.com/t/comments-panel/4041/15 "2019-12-31T19:29:05Z")

</div>

Nice. My customer just asked if they could have drop downs for canned comments, and to be able to edit previous comments. I don’t suppose you would like to post what you have? If you still have this.
