Add column full.name to activityocmq table

Hi, i need to add a new column in the historical activities, i only have a operator field in the activitieocmq, but i need to show the full name of the operator. How can i do that? what you recomend?

Parents
  • It's not only adding that field to the activityocmq table. If you wanted to capture the operator's full name in that manner (as an additional field), you would need to add code into the RAD/Process/whatever that runs the activity updates. A much more straightforward method might be to add the full name in the description of the activity update.

    For example, if I have a line in activityactions which says:

    {"The request status is changed from \""   status in $L.file.save   "\" to \""   status in $L.file   "\"."}

    then I could change that to:

    {"By " $lo.contact.name ": The request status is changed from \""   status in $L.file.save   "\" to \""   status in $L.file   "\"."}

    and it would capture the user's full name every time that activity occurs.

Reply
  • It's not only adding that field to the activityocmq table. If you wanted to capture the operator's full name in that manner (as an additional field), you would need to add code into the RAD/Process/whatever that runs the activity updates. A much more straightforward method might be to add the full name in the description of the activity update.

    For example, if I have a line in activityactions which says:

    {"The request status is changed from \""   status in $L.file.save   "\" to \""   status in $L.file   "\"."}

    then I could change that to:

    {"By " $lo.contact.name ": The request status is changed from \""   status in $L.file.save   "\" to \""   status in $L.file   "\"."}

    and it would capture the user's full name every time that activity occurs.

Children
  • Verified Answer

    How we solved this in our environment was with a pre.add trigger on the activity* table.

    We had the same requirement - users wanted both ID and full name captured when an activity record was generated.  (If they had just wanted Full Name, that could have been accomplished with the environment record; there's a flag 'Use Operator Full Name', though that has other effects as well).

    So, what we did was, we added a field to capture Full Name in the activity table, and then created a 'trigger' record like the following:

    Trigger Name: activity.add.cg_fullName
    Table Name: activity (though you'd make this whatever table you want to add the full name to)
    Trigger Type: 1 - before add
    Script -
    record.operator_fullname = vars.$lo_ufname

    When the activity record is generated, the system captures the full name of the operator who performed the action and populates that into the custom 'operator.fullname' field we added to the activity table

  • Really nice idea, @Jacob Heubner! Much more succinct than adding the user name at the beginning of every activityactions line. :)