Count Select Instances

Count Select Instances

From
Reddit
Status
Updating
Formulas
Share
DB1
Name
Class
DB2
History
English
Chemistry
History
DB2
Name
DB1
Class
History Count

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
Name
Tag
DB2
Learning
Learning
Learning
Learning
Learning
Learning
Learning
Important
Important
Event
Event
DB2
Name
DB1
Tags
Tag Count
Tag Count (Alt)
Event: 0 Important: 0 Learning: 0
Event: 0 Important: 0 Learning: 0
Event: 0 Important: 0 Learning: 0

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.
 
 
By Ben  •  Latest  •  Was this helpful? Please consider buying me a coffee. Cheers!By Ben  •  Latest  •  Was this helpful? Please consider buying me a coffee. Cheers!
By Ben • Latest • Was this helpful? Please consider buying me a coffee. Cheers!