Adding comments to the format field of a search

Is there a way to add either all or the last comment to the format section
of a search? I have a customer who would like to pull the comments or last
comments, etc in a search and have it exported along w/ the other data to a
spreadsheet.

To do that though as I am to understand, I’d need to have a comment field
in the format section in the advanced edit query section. I’ve tried
adding Comment, Comments, LastComment, but none of those work.
Is there another way of doing this or is it called something else?

Is there a way to add either all or the last comment to the format
section of a search? I have a customer who would like to pull the
comments or last comments, etc in a search and have it exported along w/
the other data to a spreadsheet.

To do that though as I am to understand, I’d need to have a comment
field in the format section in the advanced edit query section. I’ve
tried adding Comment, Comments, LastComment, but none of
those work. Is there another way of doing this or is it called
something else?

Check out RTx::TicketlistTransactions
https://metacpan.org/module/RTx::TicketlistTransactions. It’s similar
to what you want, and may be enough. If it’s not, you can use it as a
basis to modify and provide your own.