Professional Documents
Culture Documents
Using Formulas To Create A History of Metadata Edits
Using Formulas To Create A History of Metadata Edits
Ever wonder who’s been editing your asset records? Cumulus automatically records the most recent record modification
date, but you can add an easy field formula to your catalogs that will enable you to see a historical record of edits that you
can search, review and refer to when needed.
An overview of the basics. Before we get into the setup details, let’s cover about this special catalog, but refer to the
Even if you don’t know how to program, or you’re some of the things you need to know up front. “What’s the $Users catalog?” sidebar if you’re
not familiar with field formulas in Cumulus, you’ll curious. The date and time come from a simple
Adding catalog fields You’ll need to know how to
be able to make use of this simple tip. Once we’re formula function call.
add a new field to your catalog.
done, what you’ll end up with is a catalog field
To handle any situations in which there might not
that’s automatically updated each time an asset Adding fields to view sets You’ll need to know
be a user login value available, we’ll check for a
record is saved. Figure 1 shows how the field how to add a field to a view set.
value in that field before we use it. If we don’t find
might appear in use.
Armed with these skills, let’s get started. one, we’ll mention that in our time stamp.
The formula starts with:
The Edit History field.
The field we’ll use is a standard String type. The userFieldHasValue("Login Name")
only difference between this field and any other If a value exists, the function returns 1; otherwise
you might create, is that the contents of our field we get 0 (zero). If we get a 1, we start building
will be entered by a formula, not by user input. our time stamp, starting with the date/time:
Create the new field and configure it using the now()
settings shown in figure 2.
We add a space after that (for readability) and
The magic of the formula then get the user login:
Our formula grabs the login name of the current
user, along with the current date/time, and userFieldValue("Login Name")
inserts those values at the top of the Edit History After that we add a line break and “paste” in the
field, resulting in a reverse chronological history. old field value:
FIGURE 1: The Edit History field added to an info The formula gets the user’s login name from the fieldValue("Edit History")
window.
$Users catalog. It’s not important to know much
Canto, the Canto logo and Cumulus are registered trademarks of Canto. Other company and product names might be trademarks of their respective owners.
EDU/mkTIP-EditTimeStamps/2010.07 Copyright ©2010 Canto GmbH. All rights reserved. www.canto.com Page 1 of 2
LEARNING CUMULUS (POWER TIP): Using Formulas to Create a History of Metadata Edits
If we checking for a value in the “Login Name” If you copy and paste this formula into the for-
field we got a zero instead of a 1 (indicating the mula editor in your catalog, make sure the field
field had no value), we’d just add “Unknown names used match the ones in your catalog.
User” in place of the current user name.
When we combine these various functions (with View set considerations.
some additional stuff thrown in for formatting You can add your Edit History field to any view
and logic flow), we get what’s seen in figure 1, sets and views you like, but the Info View and
with a new entry added each time the asset Info Window work best, because scroll bars will
record is saved. appear when needed.
In its entirety, the formula is: When adding the field to a new view, access the
field’s properties to set the height to a suitable
userFieldHasValue("Login Name") value. Figure 3 shows how you can set the field
? height to 5 lines, which is a good starting value
for this purpose.
now() + " "
If you want to see the field when using the Web
+ userFieldValue("Login Name") + "\n” Client, add it to the Info View, because the Info Want to log user actions too?
Window is not available in the Web Client. Cumulus 8 enables you to log user actions, such
+ fieldValue("Edit History") as previews, downloads, etc., via usage statistics.
: Keep in mind, the field is edited via formula and Search for “Asset Usage History” in the the
not by users, so it will always appear in a read- Cumulus Admin guide PDF for info.
now() + " " only state, regardless of the connected user’s
+ "User Unknown" + "\n” permissions.
This Power Tip is intended to work in all editions of
NOTE: Metadata edits made via the Cumulus Cumulus 7.0 or later.
+ fieldValue("Edit History")
Web Client update Edit History too. (Meta-
NOTE: (“\n” inserts a line break.) data edits are not possible in Cumulus Sites.)
Canto, the Canto logo and Cumulus are registered trademarks of Canto. Other company and product names might be trademarks of their respective owners. Some product
claims and features are not included in all versions of the software and/or might require additional Cumulus Add-ons or Plug-ins.
EDU/mkTIP-EditTimeStamps/2010.07 Copyright ©2010 Canto GmbH. All rights reserved. www.canto.com Page 2 of 2