How can we help?

Array filters change the output of arrays and/or return specific content in the array. See more array filters here, however please keep in mind that not all Liquid filters work in Rallybound's system. 

Filters on this page:

  • all_info
  • contact_info
  • field_by_api_name
  • field_by_label
  • first
  • last
  • term_by_name

all_info

Returns a pre-formatted text block pulled from the array information. This filter works on the following Rallybound arrays:

  • Roles
  • Registration Fields
  • Tickets

Roles

On the Roles array, all_info returns names and field information for all the roles purchased/reserved in the relevant transaction.

Input

Your roles:
{{ Roles | all_info }}

Output

Your roles:

Fundraiser
Goal Amount: $500

Attendee
T-shirt size: M, Age: Over 18

Registration Fields

On the Registration_Fields array, all_info returns names and field information for all the registrations in the relevant transaction.

Input

{{ User.Registration_Fields | all_info }}

Output

Registration Type: Walker
T-shirt size: Medium
T-shirt color: Blue

Tickets

On the Tickets array, all_info returns ticket count, names and field information for all the tickets purchased/reserved in the relevant transaction.

Input

Your tickets:
{{ Tickets | all_info }}

Output

Your tickets:

Adult (2)
Meal Preference: Chicken, Seating Preference: None
Meal Preference: Vegan, Seating Preference: Yes

Child (1)
Meal Preference: Kid Meal, Age: Under 5

contact_info

Returns a pre-formatted text block pulled from the array information. This filter works on the Captain array, for which it displays the full name (or company if first/last aren’t applicable) and email address of each team captain:

Input

For more information, contact:
{{ Team.Captains | contact_info }}

Output

For more information, contact:
John Doe, john@doe.com
Jane Doe, jane@doe.com

field_by_api_name

Returns the value of any custom field, identified by the api name. Identifying by the api name ensures that the correct field is referenced, being that unique api names are required for custom fields. 

Custom fields exist on the following Rallybound objects:

  • Campaign
  • User
  • Team
  • Role
  • Donation
  • Notification
  • Ticket
Input

{{ User | field_by_api_name: "tshirtsize" }}

Output

Medium

field_by_label

Returns the value of any custom field, identified by the field name. See field_by_api_name above for a list of objects with custom fields. 

Input

{{ User | field_by_label: "What is your t-shirt size?" }}

Output

Medium

first

Returns the first item of an array.

Input

{{ "Ground control to Major Tom." | split: " " | first }}

Output

Ground

Input

{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array.first }}

Output

zebra

You can use first with dot notation when you need to use the filter inside a tag:

Input

{% if my_array.first == "zebra" %}
    Here comes a zebra!
{% endif %}

last

Returns the last item of an array.

Input

{{ "Ground control to Major Tom." | split: " " | last }}

Output

Tom.

Input

{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array.last }}

Output

tiger

You can use last with dot notation when you need to use the filter inside a tag:

Input

{% if my_array.last == "tiger" %}
    Here comes a tiger!
{% endif %}

term_by_name

Use the filter term_by_name on the Campaign.Terms object to access any dictionary term in the campaign. This filter is most commonly used to place any of the global terms listed below, which are editable in the Admin Panel, under Campaign Dictionary. The terms listed below are identified by their default value in italics, while the actual term label that should be used with the term_by_name filter is in bold.

  • The term for attendee is Global_MemberAdjective2

  • The term for blog is Global_BlogAdjective

  • The term for captain is Global_CaptainNoun
  • The term for event or campaign is Global_EventAdjective
  • The term for participant is Global_MemberAdjective
  • The term for personal fundraiser is Global_PersonalFundraisersAdjective
  • The term for team is Global_TeamAdjective
  • The term for team in plural is Global_TeamAdjective_Plural
  • The term for ticket is DonationTicketNoun
  • The term for user is Global_UserAdjective

Below is an example of this filter in use:

Input

Join My {{ Campaign.Terms | term_by_name : "Global_TeamAdjective" }}

Output

Join My Team