Highlighted
Absent Member.
Absent Member.
492 views

Add column full.name to activityocmq table

Jump to solution

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?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Add column full.name to activityocmq table

Jump to solution

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

View solution in original post

3 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Add column full.name to activityocmq table

Jump to solution

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.

Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Add column full.name to activityocmq table

Jump to solution

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

View solution in original post

Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Add column full.name to activityocmq table

Jump to solution

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

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.