You need to print a list from the comments tables. Use a Go to Related Records step to find the comments for the ticket, then print the list of comments. Do not try to print portables. They are not meant to be printed.
Thank you for the quick response.
Can I output that list into a new layout (edit box) via an onLoad script/button?
Why would you want to copy the data to a different field?
Actually, you can print from a layout that has a portal as long as you understand the limitations and they are ones that you can work with for your report. Often, you can't avoid using a portal when you have data from multiple related tables.
It looks like the original developer was was just trying to populate a large edit field on a layout and using that to print out the comments. I've attached a screen shot of the script. Right now, it's only pulling in the most recent comment record. Seems I need to figure out a loop that will comb through all the related records.
OK, but why do YOU want to do the same?
This can be made to work, though I would never use copy and paste script steps to do so. Nor do I use steps that start with Insert when Set Field accomplishes the same result without "breaking" should the target field ever be removed from the layout.
That said, both the List and ExecuteSQL functions may be used to pull data from multiple records of a different table into a single field all in one go.
Because I'm new at this and have no idea what I'm doing. =)
The customer wants to be able to print out comments. What's the best way for me to do that, with my limited experience in the tool so far?
rgordon's suggestion is the best first approach. Using that method you can size your comments field to be many rows tall but set to slide up/ reduce enclosing part.
The method shown in your script example has it's uses and may be necessary, but it's not the method that should be used if there's a simpler method available that gets the job done.