Arrays

Working With Arrays

These filters help you in working with arrays.

 

Abs

Show Details
Server: v16.0

Returns the absolute or unsigned value of any input that can be converted to a number.

 

AddCssLink

Show Details
Server: v7.0

Adds a CSS link to the page. If the link has already been previously registered (by a block or other Lava) it will not be duplicated.

 

AddLinkTagToHead

Show Details
Server: v4.0

Adds a link to the HTML head of the current page.

 

AddMetaTagToHead

Show Details
Server: v4.0

Creates a meta tag that will be inserted into the HTML head. This is useful for adding social media links.

 

AddResponseHeader

Show Details
Server: v12.0

Adds a header to the HTTP response. This allows you to set custom headers. Note that any headers already being set in Rock will overwrite the values you provide. These should only be used to add custom headers.

 

Address

Show Details
Server: v2.0

Provides an address for the person you provide.

 

AddScriptLink

Show Details
Server: v7.0

Adds a script link to the page. If the link has already been previously registered (by a block or other Lava) it will not be duplicated.

 

AddSegment

Show Details
Server: v14.1

Adds a person to one or more personalization segments.

 

AddToArray

Show Details
Server: v13.0

Add a new item to an existing array.

 

AddToDictionary

Show Details
Server: v13.0

Takes an existing (or empty) dictionary and returns a new dictionary with the added key and value.

 

AddToMergeFields

Show Details
Server: v16.2

Allows you to add a new item to the provided Lava merge fields.

 

AdjustHue

Show Details
Server: v8.5 Mobile: v1.0

Adjusts the hue by the specified percentage (10%) or degrees (10deg).

 

AgentToolHistoryContent

Show Details
Server: v18.0

Replaces the content that will be used for the hidden chat history with the supplied value. This allows the normal payload to be used for this request by the agent to construct the response but a different content object to be stored in history when processing follow up chat messages.

 

AgentToolInstructions

Show Details
Server: v18.0

Adds additional instructions that will be given to the language model as part of the response. When providing a structured return type this will let you give hints to the agent about how it should format or otherwise use the result.

 

AgentToolMetadata

Show Details
Server: v18.0

Adds additional metadata to the result to be used by the agent when crafting the response text. It is not stored in the hidden chat history.

 

AgentToolNoHistory

Show Details
Server: v18.0

Removes any chat history content from the result. This will prevent any information about the result of this tool call from being placed into chat history.

 

AgentToolReferenceRoute

Show Details
Server: v18.0

Updates the current result to include a route to a related page. For example, a link to the person profile page or a group detail page.

 

AgentToolResult

Show Details
Server: v18.0

Sets the result status and content of the agent tool. This will replace any existing result that may have previously been created. The result object is returned which allows easy chaining to other result related filters.

 

AllKeysFromDictionary

Show Details
Server: v13.0

Retrieves all keys that exist in the dictionary object and returns them in an array.

 

Append

Show Details
Server: v1.0 Mobile: v1.0

Adds a given string to the end of the input.

 

AppendFollowing

Show Details
Server: v10.0

Returns the following status for the currently logged in user to the results of an entity command or Persisted Dataset.

 

AppendSegments

Show Details
Server: v17.0

Adds personalization segment information for the currently logged in user to the results of an entity command or Persisted Dataset.

 

AppendWatches

Show Details
Server: v16.0

Returns information about whether the current person has watched various media files provided. This filter is highly customizable to work in various different scenarios.

 

AsBoolean

Show Details
Server: v7.0 Mobile: v1.0

Converts the input to a Boolean (true/false) value.

 

AsDateTime

Show Details
Server: v7.0 Mobile: v1.0

Converts the input to a DateTime value.

 

AsDateTimeUtc

Show Details
Server: v14.1

Converts the input to a DateTime value in Coordinated Universal Time (UTC).

 

AsDecimal

Show Details
Server: v7.0 Mobile: v1.0

Converts the input to a decimal value.

 

AsDictionary

Show Details
Server: v19.0

Takes an object and creates a new dictionary that contains the same keys and values. If the input is already a dictionary, then the input is returned without change.

 

AsDouble

Show Details
Server: v7.0 Mobile: v1.0

Converts the input to a double value (which has less precision than a decimal).

 

AsEnum

Show Details
Server: v18.0

Converts an integer to it's enum value.

 

AsGuid

Show Details
Server: v16.5

Converts the input to a Guid value.

 

AsInteger

Show Details
Server: v7.0 Mobile: v1.0

Converts the input to an integer value.

 

AsString

Show Details
Server: v7.0 Mobile: v1.0

Converts the input to a string value.

 

AtLeast

Show Details
Server: v9.0 Mobile: v1.0

Limits a number to a minimum value.

 

AtMost

Show Details
Server: v9.0 Mobile: v1.0

Limits a number to a maximum value.

 

Base64Encode

Show Details
Server: v7.0

Encodes the contents of a Rock binary file as a Base64 encoded string.

 

Campus

Show Details
Server: v5.0

Campus returns the person's campus. Since a person can have more than one campus (if they are a part of more than one family) the first campus will be provided. If you would like an array of all their campuses you can provide the 'All' extension.

 

Capitalize

Show Details
Server: v1.0 Mobile: v1.0

Capitalizes the first letter of each word in the string. The string 'lorem ipsum dolor' would become 'Lorem Ipsum Dolor'.

 

Ceiling

Show Details
Server: v4.0 Mobile: v1.0

Takes a number and returns the next largest integer.

 

Children

Show Details
Server: v6.0

Returns a list of children for the person

 

Client

Show Details
Server: v7.0

Returns information about the client browser.

 

Compact

Show Details
Server: v16.0

Removes empty or null values from an array.

 

Concat

Show Details
Server: v16.0

Joins multiple arrays together so that the result contains all the items from the input arrays.

 

Contains

Show Details
Server: v8.0 Mobile: v1.0

The contains filter returns true if the specified value is in the array

 

CreateEntitySet

Show Details
Server: v16.3

Creates a new EntitySet from a list of entity identifiers of the specified type.

 

CreateShortLink

Show Details
Server: v8.0

Creates a URL short link for the provided URL.

 

Darken

Show Details
Server: v8.5 Mobile: v1.0

Darkens the color by a provided percentage.

 

Date

Show Details
Server: v1.0 Mobile: v1.0

Displays the date given a format string. The string 'Now' can be used for the current date/time.

 

DateAdd

Show Details
Server: v4.0 Mobile: v1.0

Adds a span of time to a provided date (default is in days).

 

DateDiff

Show Details
Server: v1.0 Mobile: v1.0

Takes two datetimes and returns the difference in the unit you provide. You can provide the value 'Now' for either the start or end date.

 

DateRangeFromSlidingFormat

Show Details
Server: v13.4

Provides a start and end date from a sliding date range format (typically from the Sliding Date Range control).

 

DatesFromICal

Show Details
Server: v4.0

Returns a list of upcoming dates from an iCal string or List of iCal strings.

 

DaysFromNow

Show Details
Server: v4.0 Mobile: v1.0

Returns a humanized string of the number of days from now without concern for time.

 

DaysInMonth

Show Details
Server: v7.0 Mobile: v1.0

Returns the number of days in the month you provide.

 

DaysSince

Show Details
Server: v8.0 Mobile: v1.0

Returns the number of days that have passed since a given date.

 

DaysUntil

Show Details
Server: v8.0 Mobile: v1.0

Returns the number of days from now.

 

Debug

Show Details
Server: v7.0

The debug filter provides you with a ton of information on the variables you have access to in your Lava.

 

Decrypt

Show Details
Server: v7.4

Decrypts an encrypted value.

 

Default

Show Details
Server: v3.0 Mobile: v1.0

Returns the passed default value if the value is undefined or empty, otherwise the value of the variable.

 

DeleteUserPreference

Show Details
Server: v7.0

Rock has the concept of saved settings / preferences for each user. This filter allows you to clean up the setting based on its key.

 

Desaturate

Show Details
Server: v8.5 Mobile: v1.0

Desaturates (mutes) the color by a provided percentage.

 

Distinct

Show Details
Server: v13.0

Takes an array as input and returns the distinct (unique) elements of the array.

 

DividedBy

Show Details
Server: v1.0 Mobile: v1.0

Divides a number by the number provided.

 

Downcase

Show Details
Server: v1.0 Mobile: v1.0

This filter transforms all characters in the string to lower case. The string 'LoRem IpSum DoLor' would become 'lorem ipsum dolor'.

 

Encrypt

Show Details
Server: v16.3

Encrypts a string of text using the encryption key configured for the current Rock instance.

 

EntityFromCachedObject

Show Details
Server: v11.0

Returns a full entity object loaded from the database from its cached counterpart.

 

Escape

Show Details
Server: v1.0 Mobile: v1.0

HTML encode string. All <tags> will be encoded to '&lt;tags&gt;'

 

EscapeDataString (aka UrlEncode)

Show Details
Server: v5.0 Mobile: v1.0

Converts a string to its escaped representation using Uri.EscapeDataString (aka URL Encoding).

 

EscapeOnce

Show Details
Server: v16.0

HTML encodes a string without changing any existing encoding. All <tags> will be encoded to '&lt;tags&gt;', whereas previously encoded text such as '&lt;tags&gt;' won't be modified.

 

FadeIn

Show Details
Server: v8.5 Mobile: v1.0

Decreases the opacity level by the given percentage. This makes the color less transparent (opaque).

 

FadeOut

Show Details
Server: v8.5 Mobile: v1.0

Increases the opacity level by the given percentage. This makes the color more transparent.

 

FamilySalutation

Show Details
Server: v7.0

Returns the salutation of the family for a given person.

 

FilterFollowed

Show Details
Server: v10.0

Returns a subset of followed entities for the current user from either a Persisted Dataset or an entity command.

 

FilterUnfollowed

Show Details
Server: v10.0

Returns a subset of entities that have not been followed by the current user from either a Persisted Dataset or an entity command.

 

First

Show Details
Server: v1.0 Mobile: v1.0

Returns the first item from an array/collection.

 

Floor

Show Details
Server: v4.0 Mobile: v1.0

Takes a number and returns the next smallest integer.

 

Format

Show Details
Server: v4.0 Mobile: v1.0

Formats the number based on a pattern you provide.

 

FormatAsCurrency

Show Details
Server: v4.0 Mobile: v1.0

Provides a simple way to display an internationalized currency amount. The filter uses the currency symbol defined in the 'OrganizationCurrencyCode' global attribute.

 

FromBase64

Show Details
Server: v13.0

Decodes the base 64 encoded string and returns the resulting data.

 

FromCache

Show Details
Server: v7.0

Reads objects from the Rock cache which will reduce the number of database reads your Lava produces.

 

FromIdHash

Show Details
Server: v16.0

Returns a Rock Entity Id from an IdHash string generated by the ToIdHash filter.

 

FromJSON

Show Details
Server: v5.0 Mobile: v1.0

Takes a JSON string and makes a Lava object from it.

 

FromMarkdown

Show Details
Server: v5.0

Converts a string of Markdown to HTML. See the Commonmark website for details on Markdown syntax.

 

GeofencingGroupMembers

Show Details
Server: v4.0

Returns a collection of group members whose groups geofence the person's map location address.

 

GeofencingGroups

Show Details
Server: v4.0

Returns a collection of groups that geofence the person's map location address.

 

GetPersonAlternateId

Show Details
Server: v8.1

Returns the person's alternate id.

 

GetUserPreference

Show Details
Server: v7.0

Rock has the concept of saved settings / preferences for each user. This filter allows you to retrieve the setting based on its key. This is a great way of remembering something about the user (like settings from the last time they ran something) for use when they return.

 

Grayscale

Show Details
Server: v8.5 Mobile: v1.0

Returns the color in greyscale.

 

Group

Show Details
Server: v5.0

Returns group member information if a person is in a specific group.

 

GroupBy

Show Details
Server: v13.0

Takes a collection of items and groups them by the specified property tree value.

 

GroupByGuid

Show Details
Server: v7.0

Returns a full Group object from the Guid of the group.

 

GroupById

Show Details
Server: v7.0

Provides a full Group object by providing an Id of the group.

 

Groups

Show Details
Server: v4.0

Returns a list of group member models of a specified group type that an individual belongs to.

 

GroupsAttended

Show Details
Server: v4.0

Returns a list of groups that a person attended within a provided group type.

 

GuidToId

Show Details
Server: v17.0

Converts one or more entity Guid identifiers to corresponding Id values for the specified entity type.

 

HasRightsTo

Show Details
Server: v6.0

This filter helps you check CurrentPerson's security for the entity you pass it.

 

HasSignedDocument

Show Details
Server: v7.0

Allows you to determine if someone has already signed a document.

 

HeadOfHousehold

Show Details
Server: v7.0

Returns the head of household of the provided person.

 

HmacSha1

Show Details
Server: v10.0 Mobile: v1.0

Converts a string into a SHA-1 hash using a hash message authentication code (HMAC).

 

HmacSha256

Show Details
Server: v10.0 Mobile: v1.0

Converts a string into a SHA-256 hash using a hash message authentication code (HMAC).

 

HtmlDecode

Show Details
Server: v4.0

Decodes an escaped string of HTML.

 

Humanize

Show Details
Server: v1.0 Mobile: v1.0

This filter takes computer friendly strings like 'camelCase', 'underscore_a_point' or 'css-classes' and makes them friendly to us humans... 'Camel case', 'underscore a point' or 'css classes'.

 

HumanizeDateTime

Show Details
Server: v1.0 Mobile: v1.0

Compares the provided date/time to the current date/time and returns a human friendly string like 'yesterday' or '2 hours ago'.

 

HumanizeTimeSpan

Show Details
Server: v1.0 Mobile: v1.0

Takes two datetimes and humanizes the difference like '1 day'. Supports 'Now' in either the start or end date.

 

ImageUrl

Show Details
Server: v12.0

Simplifies making an image URL with a fallback.

 

Index

Show Details
Server: v7.0 Mobile: v1.0

Provides an easy way to retrieve an item from an array using its index when chaining filters.

 

Indexer

Show Details
Server: v7.0

Returns the item at the specified index location in an array. Note that array numbering starts from zero, so the first item in an array is referenced with [0].

 

IsDateBetween

Show Details
Server: v14.0

Determine if the provided date falls within a given range.

 

IsFollowed

Show Details
Server: v10.0

Takes an entity object as input and tests if it is being followed by the current person. Returns a boolean value of either true or false.

 

IsInDataView

Show Details
Server: v14.1

Takes the given Entity or Entity Id and returns a boolean that indicates whether the entity is in the data view or not.

 

IsInSecurityRole

Show Details
Server: v14.0

Takes the given person object and tests if they are the given security role. Returns a boolean value of either true or false.

 

Join

Show Details
Server: v1.0 Mobile: v1.0

Combines the properties of an array with the character passed as the parameter.

 

Last

Show Details
Server: v1.0 Mobile: v1.0

Returns the last item from an array/collection.

 

LastAttendedGroupOfType

Show Details
Server: v4.0

Returns the latest attendance record for a group of the type given.

 

Lighten

Show Details
Server: v8.5 Mobile: v1.0

Lightens the color by a provided percentage.

 

Linkify

Show Details
Server: v8.0

Convert strings within the text that appear to be http/ftp/https links into clickable html links

 

Map

Show Details
Server: v1.0 Mobile: v1.0

Takes a property name as a parameter, and creates a new array of each object's value for that property. If an object doesn't have that property, a null will be included in the final array.

 

Md5

Show Details
Server: v10.0 Mobile: v1.0

Converts a string into an MD5 hash.

 

MetersToMiles

Show Details
Server: v18.0

Converts meters to miles.

 

MilesToMeters

Show Details
Server: v18.0

Converts miles to meters.

 

Minus

Show Details
Server: v1.0 Mobile: v1.0

Subtracts a number from the number provided.

 

Mix

Show Details
Server: v8.5 Mobile: v1.0

Mixes the specified color with the input color with the given amount.

 

Modulo

Show Details
Server: v1.0 Mobile: v1.0

The modulo filter returns the remainder of division of one number by another.

 

NearestCampus

Show Details
Server: v16.0

Gets the nearest campus or campuses for a person's mapped location address.

 

NearestGroup

Show Details
Server: v4.0

Returns the nearest group of a specified group type to the person's mapped location address.

 

NearestGroups

Show Details
Server: v18.0

Returns the nearest groups of a specified group type to the person's mapped location address.

 

NewlineToBr

Show Details
Server: v1.0 Mobile: v1.0

Add <br/> tags in front of all newlines in the string

 

NextDayOfTheWeek

Show Details
Server: v8.0 Mobile: v1.0

Advances the date to a specific day in the next 7 days.

 

Notes

Show Details
Server: v7.0

Retrieves notes for the provided entity.

 

NumberToOrdinal

Show Details
Server: v1.0 Mobile: v1.0

Takes 1, 2 or 3 and returns 1st, 2nd or 3rd.

 

NumberToOrdinalWords

Show Details
Server: v1.0 Mobile: v1.0

Takes 1, 2 or 3 and returns first, second or third.

 

NumberToRomanNumerals

Show Details
Server: v1.0 Mobile: v1.0

For those Latin lovers, this filter takes a number and returns its Roman numeral equivalent.

 

NumberToWords

Show Details
Server: v1.0 Mobile: v1.0

Takes 1, 2 or 3 and returns one, two or three.

 

ObfuscateEmail

Show Details
Server: v4.0 Mobile: v1.0

Hides the details of an email address with enough information to confirm that it was sent to an address the user would recognize.

 

Object

Show Details
Server: v1.0

Objects are records or "entities" in Rock that have properties.

 

OrderBy

Show Details
Server: v10.0 Mobile: v1.0

Orders a collection of elements by the specified property tree and returns a new collection in that order.

 

Page

Show Details
Server: v4.0

Returns information about the current page.

 

PageParameter

Show Details
Server: v7.0

Returns the value of a specified page parameter.

 

PageRedirect

Show Details
Server: v4.0

Will redirect the page to the provided URL.

 

PageRoute

Show Details
Server: v13.0

Converts a page identifier into a URL string.

 

Parents

Show Details
Server: v4.0

Returns a list of the adults in the family of a specified person.

 

PersistedDataset

Show Details
Server: v10.0

Returns data contained in a Persisted Dataset as a Lava object.

 

PersonActionIdentifier

Show Details
Server: v8.7

Creates a non-security type token that identifies a person and a corresponding action. This action is intended for use by developers.

 

PersonalizationItems

Show Details
Server: v14.0

Returns an array of personalization items for the specified person and the current page context.

 

PersonByAliasGuid

Show Details
Server: v8.4

Returns a full person object from the Guid of a person alias.

 

PersonByAliasId

Show Details
Server: v4.0

Returns a full person object from the Id of a person alias.

 

PersonByGuid

Show Details
Server: v5.0

Returns a full person object from the Guid of the person.

 

PersonById

Show Details
Server: v4.0

Returns a full person object from the Id of the person.

 

PersonByPersonActionIdentifier

Show Details
Server: v17.0

Retrieves a person using a generated action identifier and the corresponding action. The action should be the same one used when the token was created.

 

PersonByPersonAlternateId

Show Details
Server: v8.1

Returns a person from the provided alternate id.

 

PersonImpersonationToken

Show Details
Mobile: v1.0

Appends an impersonation token (with rckipid key) to the end of a URL. It's smart enough to handle URLs with and without query string parameters. If the URL is blank, it will return just the token itself.

 

PersonTokenCreate

Show Details
Server: v7.0

Creates a person token for a provided person.

 

PersonTokenRead

Show Details
Server: v7.0

Converts a person token to a person object.

 

PhoneNumber

Show Details
Server: v4.0

Provides a phone number for the person you provide.

 

Pluralize

Show Details
Server: v1.0 Mobile: v1.0

Pluralizes the provided input while taking irregular and uncountable words into consideration.

 

PluralizeForQuantity

Show Details
Server: v4.0 Mobile: v1.0

Pluralizes the provided word if the quantity provided neither 1 (or -1).

 

Plus

Show Details
Server: v1.0 Mobile: v1.0

Adds a number to the number provided.

 

Possessive

Show Details
Server: v4.0 Mobile: v1.0

Returns the possessive form of the string.

 

Postback

Show Details
Server: v3.0

This is a very specialized Lava filter that helps to wire-up ASP.Net postbacks. This is only available on specific blocks that provide 'Postback Commands'. The 'Group Details Lava' is an example of a block that provides these hooks.

 

Prepend

Show Details
Server: v1.0 Mobile: v1.0

Adds a given string to the beginning of the input.

 

Property

Show Details
Server: v5.0 Mobile: v1.0

Returns the property of a provided object. This often saves you from having to assign an object to a variable to get just one of its properties.

 

PropertyToKeyValue

Show Details
Server: v4.0

Takes a property and returns it as a key/value pair. This is helpful for iterating over a list of properties.

 

RandomNumber

Show Details
Server: v13.0

Generates a random number between 0 and up to (but not including) the number you pass in as input.

 

ReadCookie

Show Details
Server: v12.1

Gets the value of a HTTP cookie for the current user session.

 

ReadTime

Show Details
Server: v10.0 Mobile: v1.0

Calculates the approximate reading time for a given string.

 

RegExMatch

Show Details
Server: v5.0 Mobile: v1.0

Tests the input against a Regular Expression to determine if it is a match.

 

RegExMatchValue

Show Details
Server: v9.0 Mobile: v1.0

Tests the input against a Regular Expression and returns the matching substring if a match is made; otherwise it returns nothing.

 

RegExMatchValues

Show Details
Server: v11.0 Mobile: v1.0

Tests the input against a Regular Expression and returns an array of the matching substrings. If no match is made, it will return an empty array.

 

RegExReplace

Show Details
Server: v13.0

Replaces a portion of the string passed as the input to the filter with Regular Expression matching.

 

Remove

Show Details
Server: v1.0 Mobile: v1.0

Remove all occurrences of a given string.

 

RemoveFirst

Show Details
Server: v1.0 Mobile: v1.0

Removed the first occurrence of a given string.

 

RemoveFromArray

Show Details
Server: v13.0

Take a collection of objects and return a new collection which does not contain the specified value.

 

RemoveFromDictionary

Show Details
Server: v13.0

Removes the specified key from a dictionary of keys and values.

 

RenderStructuredContentAsHtml

Show Details
Server: v15.0

Takes the given structured content and renders it as HTML.

 

Replace

Show Details
Server: v1.0 Mobile: v1.0

Replace all occurrences of a given string.

 

ReplaceFirst

Show Details
Server: v1.0 Mobile: v1.0

Replace the first occurrence of a given string.

 

ReplaceLast

Show Details
Server: v4.0 Mobile: v1.0

Replaces the last occurrence of a string pattern with a new value.

 

ResolveRockUrl

Show Details
Server: v7.0

This filter helps to resolve the application path in Rock using ~/ for the application home and ~~/ for the theme home. This is helpful when writing Lava that may be used by several organizations.

 

Reverse

Show Details
Server: v14.0

Reverses the order of the items in an array.

 

Right

Show Details
Server: v7.0 Mobile: v1.0

Returns the right most part of a string of the given length.

 

RockInstanceConfig

Show Details
Server: v12.0

Shows configuration values for the current Rock instance.

 

Round

Show Details
Server: v16.0

Rounds a number to the nearest integer, or to a specified number of decimal places.

 

RunLava

Show Details
Server: v13.0

Executes Lava that is inside a string.

 

SanitizeSql

Show Details
Server: v8.0

Accepts a string as input and sanitizes it for use in a SQL statement.

 

Saturate

Show Details
Server: v8.5 Mobile: v1.0

Saturates (makes the color richer) the color by a provided percentage.

 

Select

Show Details
Server: v4.0 Mobile: v1.0

Takes a property name as a parameter, and creates a new array of each object's value for that property. If an object doesn't have that property, it won't be included in the final array.

 

SentenceCase

Show Details
Server: v1.0 Mobile: v1.0

Changes the string to be in sentence case.

 

SetPageTitle

Show Details
Server: v4.0

Takes a string as input and sets the page's title.

 

SetUrlParameter

Show Details
Server: v14.0

Sets a parameter in the input URL string and returns the updated URL.

 

SetUserPreference

Show Details
Server: v7.0

Rock has the concept of saved settings / preferences for each user. This filter allows you to save the setting based on its key and provided value. This is a great way of remembering something about the user (like settings from the last time they ran something) for use when they return.

 

Sha1

Show Details
Server: v10.0 Mobile: v1.0

Converts a string into a SHA-1 hash.

 

Sha256

Show Details
Server: v10.0 Mobile: v1.0

Converts a string into a SHA-256 hash.

 

Shade

Show Details
Server: v8.5 Mobile: v1.0

Shades (adds black) the specified color by the specified amount.

 

Shuffle

Show Details
Server: v4.0 Mobile: v1.0

Randomizes the order of an array. Useful for ads on a homepage where you'd like a different ad to be first for each visit.

 

Singularize

Show Details
Server: v1.0 Mobile: v1.0

It’s like the antidote to pluralize. Makes plural words singular.

 

Size

Show Details
Server: v1.0

Returns the length of the string, including all characters and spaces.

 

Size

Show Details
Server: v1.0 Mobile: v1.0

Provides the number of items in the array.

 

Slice

Show Details
Server: v6.0 Mobile: v1.0

The slice filter returns a substring, starting at the specified index. An optional second parameter can be passed to specify the length of the substring. If no second parameter is given, a substring of one character will be returned.

 

Slice (arrays)

Show Details
Server: v13.1

The slice filter (when used on an array) returns a subset of the given array, starting at the specified index. An optional second parameter can be passed to specify the length of the subset. If no second parameter is given, a subset of one item will be returned.

 

Sort

Show Details
Server: v1.0 Mobile: v1.0

Sorts a primitive array (in case-sensitive order in Fluid). To sort by the properties of an array, use OrderBy.

 

SortByAttribute

Show Details
Server: v5.0

Sorts an array of items based on an attribute value.

 

SortNatural

Show Details
Server: v16.0

Fluid only: Sorts a primitive array, in case-insensitive order. To sort by the properties of an array, use OrderBy.

 

Split

Show Details
Server: v1.0 Mobile: v1.0

Splits a string into an array based on a matching pattern.

 

Spouse

Show Details
Server: v7.0

Returns the spouse of the provided person.

 

Steps

Show Details
Server: v13.0

Returns a filtered list of steps that the person has engaged with.

 

StripHtml

Show Details
Server: v1.0 Mobile: v1.0

Remove all HTML tags from the string.

 

StripNewlines

Show Details
Server: v1.0 Mobile: v1.0

Remove all new line characters (\r\n) from the string.

 

Sum

Show Details
Server: v13.0

Performs a mathematical summation of all numeric values in an array and outputs the result.

 

SundayDate

Show Details
Server: v5.0 Mobile: v1.0

Returns the Sunday date portion (without any time portion) of the date provided.

 

TimeOfDay

Show Details
Server: v13.1

Returns a description of the time of day for an input value that represents a date/time. The keyword 'Now' can be used to represent the current time.

 

Times

Show Details
Server: v1.0 Mobile: v1.0

Multiplies a number by the number provided.

 

Tint

Show Details
Server: v8.5 Mobile: v1.0

Tints (adds white) the specified color by the specified amount.

 

TitleCase

Show Details
Server: v1.0 Mobile: v1.0

Takes an ordinary string like 'of mice and men' and makes it usable as a title, 'Of Mice And Men'.

 

ToBase64

Show Details
Server: v19.0

Encodes a string (or byte collection) as a Base64 string.

 

ToCssClass

Show Details
Server: v1.0 Mobile: v1.0

Converts string to a CSS class name format (e.g. home-phone).

 

ToIdHash

Show Details
Server: v16.0

Returns an alphanumeric string that can be used to uniquely identify a Rock Entity.

 

ToJSON

Show Details
Server: v4.0 Mobile: v1.0

Returns a JSON representation of the object. This is useful if you are wanting to return the object for use in JavaScript.

 

ToMarkdown

Show Details
Server: v20.0

Converts a string of HTML to Markdown. See the Commonmark website for details on Markdown syntax.

 

ToMidnight

Show Details
Server: v8.0 Mobile: v1.0

Sets the time to midnight for a specific day.

 

ToPascal

Show Details
Server: v1.0 Mobile: v1.0

For all the programmers in the house. This will take a string and return it back in PascalCase.

 

ToQuantity

Show Details
Server: v1.0 Mobile: v1.0

Many times you want to call Singularize and Pluralize to prefix a word with a number; e.g. "2 requests", "3 men". ToQuantity prefixes the provided word with the number and accordingly pluralizes or singularizes the word.

 

ToString

Show Details
Server: v1.0 Mobile: v1.0

Converts a number to a string.

 

Trim

Show Details
Server: v4.0 Mobile: v1.0

Removes all blank spaces (or instances of an optional character string) from the beginning and end of the input string.

 

TrimEnd

Show Details
Server: v14.0

Removes all blank spaces (or instances of an optional character string) from the end of the input string.

 

TrimStart

Show Details
Server: v14.0

Removes all blank spaces (or instances of an optional character string) from the beginning of the input string.

 

Truncate

Show Details
Server: v1.0 Mobile: v1.0

Will shorten the input down to the provided size and append an optional string to the end. The length of the appending string will be counted in the truncate size. If no appending string is provided '...' will be used.

 

TruncateWords

Show Details
Server: v1.0 Mobile: v1.0

Shortens the input to the number of words provided and appends an optional string to the end. If no appending string is provided it will use '...'.

 

UnescapeDataString (aka UrlDecode)

Show Details
Server: v8.0 Mobile: v1.0

Converts a string to its unescaped representation using Uri.UnescapeDataString (aka URL Decoding).

 

Uniq

Show Details
Server: v8.0 Mobile: v1.0

Takes a collection of values and returns only the unique set of those values.

 

UniqueIdentifier

Show Details
Server: v7.0

Generates a new GUID (UUID) string. These are generally considered to be globally unique. This makes them ideal to use inside a shortcode where you need to identifier an HTML element by id but know the shortcode may be used twice on the same page.

 

Upcase

Show Details
Server: v1.0 Mobile: v1.0

This filter transforms the string to all upper case. The string 'Lorem Ipsum Dolor' would become 'LOREM IPSUM DOLOR'.

 

UpdatePersistedDataset

Show Details
Server: v18.0

Updates a persisted dataset using the specified key.

 

UploadBinaryFile

Show Details
Server: v18.0

Uploads content into a Rock Binary File. This allows file content to be persisted in the database and used at a later time. The filter returns either a BinaryFile object or null.

 

Url

Show Details
Server: v7.0 Mobile: v1.0

The Url filter allows you to easily get access to parts of a URL without a ton of string manipulation.

 

Where

Show Details
Server: v4.0 Mobile: v1.0

This filter allows you to filter a collection of items by a key and value.

 

WithFallback

Show Details
Server: v6.0 Mobile: v1.0

This filter allows you to eliminate conditional tests for null or empty values by allowing you to provide fallback text.

 

WriteCookie

Show Details
Server: v12.1

Sets a HTTP cookie for the current user session. Cookies provide a means of storing information about the current user's session that can be accessed in subsequent requests.

 

XamlWrap

Show Details
Server: v10.0 Mobile: v1.0

Wraps XAML in CDATA tags to make it XML compliant.

 

ZebraPhoto

Show Details
Server: v4.0

Returns a person's profile photo data in ZPL format for use in Zebra printer labels. If the person has no photo, the default silhouette photo (adult/child, male/female) is used.

Array Filters In Action

Reading through the filters above you might question the value of many of them. For instance what good is the 'Map' filter when it just returns a string of array values all smashed together (Avalon CampusTacoma CampusCorolla Campus). The power comes when you chain these filters together. Consider the kitchen sink example below.

{% assign sortedCampuses = Campuses | Sort:'Name' %}
{{ sortedCampuses | Map:'Name' | Join:', ' | ReplaceLast:',',' and' }}

Output:
Avalon Campus, Corolla Campus and Tacoma Campus
Subscribe To Our Newsletter