Adam C - Workflow and Web Application Consulting


Remove Last Modifier from Collaborator Field

Automatically detach collaborators from a record once they're no longer needed

View the solution base here

Base Details

  1. Data table
    1. A Collaborator field
    2. Dropdown fields for users to set the status of the record
      Data.png

Scope

The client wanted their users to update the appropriate the status of each record via the appropriate dropdown field, and upon this update, to have the user removed from the collaborator field for that record.


The Solution

Site - Remove Last Modifier from Collaborator Field.gif

  1. For each dropdown field, we created a Last modified by and Last modified time field.
  2. We then created an automation that would run whenever any of the Last modified time fields for the dropdown fields updated.
    • This automation would then run a script that would remove the user who made that latest modification from the Collaborator field.
    • The script itself can be viewed in the automation in the base.

Script Setup

To set up the script, copy it from the base and paste it into your automation.

After that, set up the recordId input variable:
Input Variables.png

And then key in the data that's required in the "SETUP" section:
Setup.png

The table is the name of the table that contains your records, and the collaboratorFieldName is the name of the Collaborator field you have created.

As you can see, because we have two dropdown fields that we are tracking, we have the following lines:

  • dropdown1LastModifiedByFieldName: "Review Process A Last Modified By"
  • dropdown1LastModifiedTimeFieldName: "Review Process A Last Modified Time"
  • dropdown2LastModifiedByFieldName: "Review Process B Last Modified By"
  • dropdown2LastModifiedTimeFieldName: "Review Process B Last Modified Time"

For each of these keys, we entered the respective field name. This enables the script to look through all of these Last Modified fields to look for the collaborator that it needs to remove.

If you have more dropdown fields, feel free to add them with an incremental number like so:

  • dropdown3LastModifiedByFieldName: "[YOUR FIELD NAME] Last Modified By"
  • dropdown3LastModifiedTimeFieldName: "[YOUR FIELD NAME] Last Modified By"
  • dropdown4LastModifiedByFieldName: "[YOUR FIELD NAME]"
  • dropdown4LastModifiedTimeFieldName: "[YOUR FIELD NAME]"
  • etc etc

Finally, the numberOfDropdowns is the number of dropdown fields we're monitoring. This should match the incremental number above.

And that's it! This one is somewhat tricky to set up, and I am always available via email at adam@thetimesaving.company or for a call via my calendly link


adam@thetimesaving.company