Formula Fields in Cumulus

You can use Cumulus formula based fields values to automatically change the label colour of a database record based on the value of another field such as, in this case, “Copyright Status”. This greatly helps identify digital assets where the copyright has either expired or needs to be defined.

To edit the properties of the label field within Cumulus navigate to the field properties button and field values tab:

Cumulus -> Preferences -> Catalog Settings -> Record Fields -> Label -> Properties -> Field Values.

Choose “Use formula based field values” for the Field Value Mode.

Insert the following code into the Field Values Formula dialog box.

(fieldValue("Copyright Status",true)) == "Royalty Free
Stock Images" ? "4" : (fieldValue("Copyright Status"
true)) == "Commissioned Images" ? "5" : (fieldValue(
"Copyright Status", true)) == "Partner Images" ? "2"
: 1

The numerical value referenced within the formula code represents the colour that the label field will be changed to. i.e. RED = 1, GREEN = 4, BLUE = 5 and ORANGE = 2.

Set the “On Formula Error” setting.

The Copyright Status field is of type string list with three pre-defined values.

  1. Commissioned Images
  2. Partner Images
  3. Royalty Free Stock Images

Change a MAC address in macOS

Start the Terminal App by going to Applications -> Utilities -> Terminal. This will enable you to submit command line instructions to the kernel.

Display your current MAC address on interface “en0” using the command shown below. Note the hexadecimal value in the “ether” field. This is your MAC address.

sudo ifconfig en0

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,
MULTICAST> mtu 1500
options=b<RXCSUM,TXCSUM,VLAN_HWTAGGING>
ether f6:e5:d4:c3:b2:a1
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (none)
status: inactive

To change the MAC address of interface “en0” of a computer running macOS run the following command :

sudo ifconfig en0 ether a1:b2:c3:d4:e5:f6

To display the altered MAC address on interface “en0′ type the command shown below:

sudo ifconfig en0

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,
MULTICAST> mtu 1500
options=b<RXCSUM,TXCSUM,VLAN_HWTAGGING>
ether a1:b2:c3:d4:e5:f6
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (none)
status: inactive

Clear local DNS cache in macOS

To flush the local DNS cache for an Apple Mac running macOS 12.x (Sierra) or later do the following.

Start the Terminal App by going to Applications -> Utilities -> Terminal. Then, type the following command and press the ENTER key to execute:

sudo dscacheutil -flushcache

Now type the next command shown below followed by the ENTER key to execute:

sudo killall -HUP mDNSResponder

Now type the final command shown below followed by the ENTER key to execute:

sudo killall mDNSResponderHelper

Cumulus XSL translation

Use the XSL script shown below to format an XML file obtained from exporting user meta data from the Users catalog using the workgroup server client program within Canto Cumulus. The code helps creates a tab delimited text file containing four fields: Email Address, Login Name, First Name & Last Name. Choose “Apply XSL Transformation” and select the pre-prepared script when using the File -> Export drop-down menu used for exporting Cumulus record meta data.

<?xml version="1.0" encoding="UTF-8"?>
<!--
    Document   : UserExport.xsl.xml
    Created on : 1 Sept 2019
    Author     : Sam Martin
    Description: The goal is to transform the Cumulus XML Export file to a text 
    file which is tab delimited.
-->
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns="http://www.canto.com/ns/Export/1.0"
    xmlns:fn="http://www.w3.org/2005/xpath-functions">
<xsl:output method="text" indent="yes" encoding="utf-8" standalone="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
	<Root>
                <xsl:text>E-Mail Address&#09;Login Name&#09;First Name&#09;Last Name&#10;</xsl:text>
		<xsl:apply-templates select="/ns:Export/ns:Items/ns:Item"/>
	</Root>
</xsl:template>
<xsl:template match="ns:Item">
	<xsl:for-each select="ns:FieldValue">
		<xsl:value-of select="normalize-space(text())"/>
		<xsl:text>&#09;</xsl:text>
        </xsl:for-each>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>