How do you get the last "work note" on a PDF report?

Beto
Mega Guru

I have created my report for my teams. I included "work notes" and the report is in list format. The problem is that it includes all work notes for that ticket making the report very long making it several pages. I would like to only get the last work note. This is what I am getting now:

 

find_real_file.png

1 ACCEPTED SOLUTION

Munender Singh
Mega Sage
Hi, You can do it this way: 1.Create a field bar lastcmnt= 'u_last_comment' on the task table 2.Now create a after Business rule and pass the value into the field using this lastcmnt = current.work_notes.getJournalEntry(1); 3.Now hide the created field lastcmnt 4.Instead of work notes,use the 'lastcmnt' field on the report Regards, Munender **Kindly mark helpful/correct it found useful

View solution in original post

3 REPLIES 3

Munender Singh
Mega Sage
Hi, You can do it this way: 1.Create a field bar lastcmnt= 'u_last_comment' on the task table 2.Now create a after Business rule and pass the value into the field using this lastcmnt = current.work_notes.getJournalEntry(1); 3.Now hide the created field lastcmnt 4.Instead of work notes,use the 'lastcmnt' field on the report Regards, Munender **Kindly mark helpful/correct it found useful

Can you point me in the right direction on step 1 "Create a field bar", what is a field bar?

 

Beto
Mega Guru

Thank you Munender

 

1. Created new field on Task table

Name: Last Comment

Value: u_last_comment

Type: String

Max length to 4,000 (or less if you want)

Add attribute: is_multi_text=false

find_real_file.png

2. Created Business Rule on for Tasks:

When: Before

Insert / Update

Script:

current.u_last_comment= current.work_notes.getJournalEntry(1);

3. Done