DB1

DB2

History Count

length(replaceAll(replaceAll(prop("Class"), "History", "*"), "[^*]", ""))

replaceAll(prop("Class"), "History", "*")

Replace every instance of History with an asterisk * or another special character that won't appear in any of the Class options.

replaceAll( ... ), "[^*]", "")

Replace everything except for the asterisks with nothing.

length( ... )

Count the number of asterisks.

Multiple Tags

DB1

DB2

Tag Count

"Event: " + format(length(replaceAll(replaceAll(prop("Tags"), "Event", "*"), "[^*]", ""))) + "\n" + "Important: " + format(length(replaceAll(replaceAll(prop("Tags"), "Important", "*"), "[^*]", ""))) + "\n" + "Learning: " + format(length(replaceAll(replaceAll(prop("Tags"), "Learning", "*"), "[^*]", ""))) + "\n"

Add a new + "Tag Name: " + format(length(replaceAll(replaceAll(prop("Tags"), "Tag Name", "*"), "[^*]", ""))) + "\n" for each new tag you add.

Tag Count (Alt)

if(length(replaceAll(replaceAll(prop("Tags"), "Event", "*"), "[^*]", "")) > 0, "Event: " + format(length(replaceAll(replaceAll(prop("Tags"), "Event", "*"), "[^*]", ""))) + "\n", "") + if(length(replaceAll(replaceAll(prop("Tags"), "Important", "*"), "[^*]", "")) > 0, "Important: " + format(length(replaceAll(replaceAll(prop("Tags"), "Important", "*"), "[^*]", ""))) + "\n", "") + if(length(replaceAll(replaceAll(prop("Tags"), "Learning", "*"), "[^*]", "")) > 0, "Learning: " + format(length(replaceAll(replaceAll(prop("Tags"), "Learning", "*"), "[^*]", ""))) + "\n", "")

Add a new + if(length(replaceAll(replaceAll(prop("Tags"), "Tag Name", "*"), "[^*]", "")) > 0, "Tag Name: " + format(length(replaceAll(replaceAll(prop("Tags"), "Tag Name", "*"), "[^*]", ""))) + "\n", "") for each new tag you add.