Você está na página 1de 2

CUMULUS POWER TIP:

Setting Label Field Values (Colors) via Formula


Use labels to visually indicate values set (or missing) in other metadata fields.

What’s a great way to indicate when an asset record’s metadata is incomplete? How
about a nice, bright red label? Now, wouldn’t it be nice for Cumulus to be able to set the Organize.
value in that label automatically?
Find Share.
Using a field formulas, it’s easy to automatically set a label’s value (color) based on values
in other metadata fields—you can even indicate when values are missing! Any File,
Anywhere.
Just A String List with Color. • When metadata is present, we want to green label.
A Cumulus label field is little more than a string list field • When metadata is missing, we want a red label.
that displays menus of color chips instead of menus of
text. Users select the color they want, and the value of
• As a safety measure, we’ll include a black label to Benefits
indicate an error condition.
that color is saved in the label field. 1. Automatically set label
Let’s get started: fields based on values
NOTE: String List field items, such as label colors, are
1. Add a new label field to your catalog and create color in other fields
referenced by item IDs, not by the item text or color.
items for it as shown in figure 1. We’ll call our new
IDs are assigned by Cumulus in the order the items 2. “Read” label values via
are added to the field. The first item is 0 (zero); the field “Magic Label.”
formulas
second item is 1; the third is 3; and so on. If you don’t get the colors correct while creating the
field, adjust them after the item is created. (Click on a 3. Provide visual
Using field formulas, you can test for label colors metadata that’s easy
color and use the color editor that appears.) Just make
(items) and even set them. The trick is to use item ID to scan
sure you end up with three items roughly colored as
numbers and not the item itself. (Figure 1) shown in figure 1. (Don’t forget to add “Magic Label” to
a view so you can see it!)
4. Color labels offer UI
elements that are
2. Next, we need a field we can “look” into for meta- language independent
data. This can be any Cumulus field type, but we’ll
use the “Caption” string field in this example. 5. Bring industry or
organizational color
The Logic. schema into Cumulus
Before we add our formula to our “Magic Label” field, workflows
let’s consider the logic used in the formula.
Our goal is to see if “Caption” includes any metadata,
Ideas for usage
so our logic flow will be: • Visually indicate when
metadata is missing
FIGURE 1: Accessed via the Properties window of any label
• Look into the “Caption” field.
field, the Label Editor enables you to add, edit and delete • If “Caption” contains data, set “Magic Label” to 1 • Visually indicate when
label field items, which are colors. The unique ID assigned
(green). approvals have been
to each item is what you’ll reference in your field formulas.
granted
• If “Caption” is empty, set “Magic Label” to 2 (red).
• If (for some unforeseen reason) neither of these con- • Devise color warning
The label field shown in figure 1 has three colors (items)
ditions is true, set “Magic Label” to 0 (black). systems for pending
added to it, each of which has a unique item value (ID).
expirations
You’ll use these item numbers to reference field label
values in your formulas. Item IDs never change, so you The Formula. • Turn label values into
can change the colors used in your label fields, or add Formulas are always added from the Properties win- unique text you can
and delete values at any time without interfering with dow of the field you want the formula to update. So, in
“round trip” via XMP
formulas already in place. (Cumulus will not “recycle” this case, we’ll add our formula to our “Magic Label”
or IPTC
item IDs, even when a previous item has been deleted field.
and a new one is created.) 3. Open the “Magic Label” field Properties window.
4. Open the Field Values tab and enable the Formula
The Metadata Field Setup. Based Field Values option, as shown in figure 2.
For this simple example, we’ll make some assumptions:

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.
C|TIP/FormulasForLabels/V1.0/07.2009 Copyright ©2009 Canto GmbH. All rights reserved. www.canto.com Page 1 of 2
CUMULUS POWER TIP: Setting Label Field Values (Colors) via Formula

FIGURE 3: If “Caption” includes data when an asset FIGURE 4: After a cataloging operation, it’s easy to
record is created or updated, “Magic Label” turns immediately see which asset records need captions—
green; otherwise, it turns red, helping users see with absolutely no searching or other user action
which asset records need attention. required. Works over the Web too!

false condition. Typically, the “action” is nothing This Power Tip is known to work in all editions of
more than putting a value into the formula’s Cumulus 7.5 and later.
“host” field, and that’s exactly what we’re doing.
FIGURE 2: Inside the same Properties window you In our formula, 1 is the value we want put into
added your label items (colors), you’ll add your for- “Magic Label” when data is found (a true condi-
mula. A fallback value is always set to indicate
when a formula error has occurred, such as a data tion) and 2 is what we want when our test
corruption. returns false. (Remember, these numbers corre-
spond to the ID numbers of the colors of the
“Magic Label” field.)
For more information
5. Enter the formula we’ll use into the formula
on how Canto Cumulus
So, Cumulus reads our complete formula as:
field, as shown in figure 2: can benefit your
If the “Caption” field has a value, then set the value
fieldHasValue("Caption")? 1 : 2
of “Magic Label” to 1 (green). If the “Caption” field is organization, contact your
Now, let’s get a better sense of what it does. empty, then set “Magic Label” to 2 (red). local Canto partner, or
Formula breakdown contact Canto directly.
The fieldHasValue function tells Cumulus to The Payoff.
look into the field specified in the parentheses When an asset is cataloged, and any time an
that follow it and see if it finds any value. We’ll asset record is updated, Cumulus runs the for- United States
call this portion of the formula the “test condi- mula and updates the value of the “Magic Label”
tion.” field.
+1 (415) 495-6545
Following the test condition comes a question Figure 3 shows our formula in action on a view
mark. This separates the test portion of the for- created for illustration purposes. Look at figure 4 Europe
mula from what we’ll call the “action” part. for a more practical example that shows how a +49 (0) 30 390 485 0
batch of newly cataloged assets can be instantly
The action portion of a formula always includes
two value choices: What should Cumulus do for
scanned for metadata omissions thanks to this Everywhere
very simple formula.
a true condition and should Cumulus do for a info@canto.com

About Canto & Cumulus


Canto has been dedicated to helping customers fully utilize their digital assets since 1990. Canto Cumulus is a cross-platform solution that enables compa-
nies to easily organize, find, share and track their ever-increasing numbers of digital files, in any format. Canto’s worldwide network of certified developers
offers an impressive assortment of plug-ins that enhance the Cumulus product line further.
Learn more: www.canto.com

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.
C|TIP/FormulasForLabels/V1.0/07.2009 Copyright ©2009 Canto GmbH. All rights reserved. www.canto.com Page 2 of 2

Você também pode gostar