Formula: CreatedBy() and ModifiedBy()
Category: People
CreatedBy()
Returns the user who created a row or object
or stated otherwise...
Hey Coda, please tell me who created this [row, table, doc, object, etc].
ModifiedBy()
Returns the user who last modified a row
or stated otherwise...
Hey Coda, please tell me who modified this [row, table, doc, object, etc.]. CreatedBy() and ModifiedBy() share one parameter:
Object
CreatedBy(Object)
Any Coda object: a table, control, columns, rows, etc.
One of Coda’s superpowers is the ability to personalize information in a doc. CreatedBy() and ModifiedBy() are gateways to seeing the information related to a specific person.
Every object created or modified in Coda automatically has this personalized information attached to it, whether or not you use the CreatedBy() and ModifiedBy() formulas. Object metadata in the backend includes the name of the creator or modifier as well as the date/time that the action happened (which can be accessed by using the additional Created() and Modified() formulas).
To explore these formulas in detail, we’ll create and modify a row in a table.
First, add a new row to the table:
Hover over the column headers for CreatedBy and ModifiedBy and take note of their column type. They’re both of type “People”, which is a super exciting realization! See if you can think of why, and we’ll come back to that point in a moment.
Hover over the Created Date/Time and Modified Date/Time columns to take note of their type as well.
The formulas for each of these columns are as follows:
CreatedBy
ModifiedBy
Created Date/Time
Modified Date/Time
CreatedBy(ThisRow)
ModifiedBy(ThisRow)
Created(ThisRow)
Modified(ThisRow)
What else can we do with those people columns? Well we can get at any information attached to the person, such as their name, image, and email address, etc. This makes the Created() and Modified() formulas even more powerful, in that it can feed other formulas in your Doc that might.
Here’s that same table above but in a Cards view.
What formulas do you think we used to get at that additional data?
Because we’ve already added the CreatedBy column with the formula CreatedBy(This Row) , we can access personalized information about the row’s creator using three new columns and formulas. Each formula references the CreatedBy row - no need to rebuild the CreatedBy(This Row) formula again:
a Text column called Photo with the formula CreatedBy.Photo a Text column called Name with the formula CreatedBy.Name an Email column called Email with the formula CreatedBy.Email ModifiedBy and Modified are useful for monitoring changes to an object. Experiment in the table below by clicking the button and watching the Modified Date/Time columns update. If someone else were to come along and click that button, the ModifiedBy column would change to them.