Database view and journal field

kchorny
Tera Guru

I've read all of the posts I can find on this subject, and still am not having any luck.

The requirement is to add the Task Notes (u_task_notes) field from the Time Card table to a view that is used for reporting time associated to project tasks.

I added the Task Notes field to the Time Card table in my view, but it displayed blank in the list... makes sense, because it's a journal field.   So I added the sys_journal_field table to the view with the where clause as shown, and added the value, element and element_id fields to its view fields.

find_real_file.png

find_real_file.png

find_real_file.png

But when I 'Try it' the Task Notes field is blank.   I've tried several other changes, nothing is working.

find_real_file.png

I have confirmed that the majority of time cards do have entries in the Task Notes field.

What am I doing wrong?

10 REPLIES 10

LaurentChicoine
Tera Guru

Hi Karla,



Try to create a new field with the type Journal List. In the dependant field set it to u_task_notes. Then use that field in your view.



For an example of that type of field you can look at the comments_and_work_notes field of the Task table.


Thank you for your response, but I don't see the point of creating a new field and duplicating data that is already there.   Is there no way for me to see the journal entry/entries that already exist in a database view?   It appears as though others have accomplished this, however their posts have not lead me to a workable solution.



I'll see if support can help me with this, and if so, I'll post their solution.


Hi Karla,



Of my knowledge the data does not get duplicated. Journal list field is a field that allows to see the concatenation of journal fields. ServiceNow use it that was on the task table so I think it is probable the best way to do it. See the journal field as the input field and Journal list field as the display field.


Okay, I tried this approach.   I created a Journal List field on the Time Card table, dependent on my Task Notes field.   Then I confirmed that the new field contained the expected data.



I then added the new field to my database view, but it still displays nothing.   I also added the Comments and Work Notes field from the Project Task table to my database view to see if I could display that data, and that doesn't work either.