Notes: Add Creator Information to the Body

Notes: Add Creator Information to the Body

The script below will append the text 'Created By: {firstName lastName}', 'Created on behalf of: {firstName lastName}', and 'Updated by: {firstName lastName}' to the end of the note description in cases where the user's Email address was changed on the __M_Users table as a result of User Mapping. 

In cases where the firm's domain has changed, every user's email address will have changed.  In which case the script below will add that information to all notes, which would be redundant for some records.  Therefore, you might want to adjust the WHERE clause.

  1. --Append Created By/Updated By/Created On Behalf Of to Notes
  2. UPDATE __M_Common_Notes SET Final_Description = CONCAT(Final_Description, CHAR(10), CHAR(10), 'Created By: ', u.Final_FirstName, ' ', u.Final_LastName) FROM __M_Common_Notes n, __M_Users u WHERE 1=1 AND u.Original_Email != u.Final_Email
  3. AND u.Id = n.Final_Created_By_Id

  4. UPDATE __M_Common_Notes SET Final_Description = CONCAT(Final_Description, CHAR(10), CHAR(10), 'Created on behalf of: ', u.Final_FirstName, ' ', u.Final_LastName) FROM __M_Common_Notes n, __M_Users u WHERE 1=1 AND u.Original_Email != u.Final_Email
  5. AND u.Id = n.Final_Created_OnBehalfOf_Id

  6. UPDATE
  7. __M_Common_Notes SET Final_Description = CONCAT(Final_Description, CHAR(10), CHAR(10), 'Updated by: ', u.Final_FirstName, ' ', u.Final_LastName) FROM __M_Common_Notes n, __M_Users u WHERE 1=1 AND u.Original_Email != u.Final_Email
  8. AND u.Id = n.Final_Updated_By_Id

    • Related Articles

    • Linearize Notes

      Some systems support note comments(notes-on-notes). On systems like this, you might see notes organized as follows: |-Matter ABC.001 +-Note 1 (2021-01-01) +-Note 2 (2021-01-02) +-Note 2A (2021-01-04) +-Note 2B (2021-01-05) +-Note 2C (2021-01-06) ...
    • Split Big Notes

      Some destinations have a max character count for notes. The script below will split notes that exceed that length into multiple notes. The subject of the note will be {original subject} (Part X of Y) and the description will be the first X number of ...
    • Create Notes from Matter Descriptions

      Some platforms do not support matter descriptions. The following will transform a matter description into a matter note. --Transform Matter Descriptions to Matter Notes INSERT INTO __M_Common_Notes (Id, Final_Parent_Id, Final_Parent_Type, ...
    • Tasks: Append Assigned To and Completed By to Descriptions

      The script below will append the text 'Assigned to User: {firstName lastName}' and 'Completed by User: {firstName lastName}' to the end of the task description in cases where the users Email address was changed on the __M_Users table as a result of ...
    • Other: Mass-Altering a Universal Database

      The Universal Schema is Continuously Evolving The Universal Database schema continually undergoes slight modifications in order to continually upgrade the migration experience. In most cases, these changes are minor and will not interrupt an ...