@Explode (Formula Language)

Returns a text list composed of the elements of a text string or date range.

  • If you specify a text string, elements are defined as sequences of characters separated by separator characters and newlines.
  • If you specify a time-date range, elements are defined as individual days within the range.

Syntax

@Explode( dateRange ) @Explode( string ) @Explode( string ; separators ) @Explode( string ; separators ; includeEmpties ) @Explode( string ; separators ; includeEmpties ; newlineAsSeparator )

Parameters

dateRange

Time-date range or time-date range list. The range of dates that you want to make into a text list. Specify a valid date-time range, not a string representation of one. For example, @Explode( "05/01/96 - 05/02/96" ) is invalid because the parameter is a string. Use @Explode( [05/01/96 - 05/02/96] ).

string

Text or text list. The string that you want to make into a text list.

separators

Text. Optional. One or more characters that define the end of an element in string. The default separators are " ,;" (space, comma, semicolon), which means that Domino® adds a new element to the text list each time a space, comma, or semicolon occurs in the original string. When you use more than one character to specify separators, each character defines one separator. For example, the specification "and" breaks the string at each occurrence of "a," "n," and "d"; it does not break the string at each occurrence of the word "and." The newline is a separator, regardless of the specification of this parameter, unless newlineAsSeparator is specified as False.

includeEmpties

Boolean. Optional. Specify True (1) to place an empty string ("") in the returned list when a separatorappears at the beginning or end of the string, or two separators appear consecutively in the string. Specify False (0) to not include empty list elements for leading, trailing, and consecutive separators. Defaults to False.

newlineAsSeparator

Note: This parameter is new with Release 6.

Boolean. Optional. Specify True (1) to treat the newline as a separator. Specify False (0) to not treat the newline as a separator. Defaults to True.

Return value

explodedString

Text list. A list containing each element found in string, or each date found in dateRange.

Usage

If the first parameter is a list, the function concatenates the list elements treating the list boundaries as separators.

Examples

  1. This example returns a, b, and c in a list.
    @Explode("a,b,c")
  2. This example returns a, b, c, d, and e in a list.
    @Explode("a,b,c" : "d,e")
  3. This example returns a list containing "Weekly," "Status," and "Report" if the content of the Topic field is "Weekly Status Report"; "Weekly,Status,Report"; "Weekly;Status;Report"; or "Weekly," "Status," and "Report" separated by newlines.
    @Explode(Topic)
  4. This example returns a list containing "Weekly," "Status," and "Report" if the content of the Topic field is "Weekly+Status+Report"; or "Weekly," "Status," and "Report" separated by newlines.
    @Explode(Topic; "+&")
  5. This example specifies the default separators but inserts empty elements for leading, trailing, and consecutive separators.
    @Explode(Topic; " ,;"; @True)
  6. This example specifies the defaults for parameters 2 and 3, but does not treat newlines as separators.
    @Explode(Topic; " ,;"; @False, @False)
  7. This example returns "Please send resume + references" if the content of the entry field is: "Please send resume & references".
    @Implode( @Explode( entry; "&" ); "+" ) 
  8. This example returns "Attendance grows at UCLA; Pomona Colleges; and USC" if the content of the Headline field is "Attendance grows at UCLA, Pomona Colleges, and USC".
    @Explode(Headline;",") 
  9. This example returns 4 if the content of the Country field is "Mexico, Guatemala, Costa Rica, El Salvador".
    @Elements(@Explode(Country; ",")) 
  10. This example returns 07/02/96; 07/03/96; 07/04/96; 07/05/96.
    @Explode([07/02/96 - 07/05/96])
  11. This example returns 07/01/94; 05/01/94; 10/01/94; 10/02/94; 10/03/94; 04/01/94; 04/02/94; 04/03/94. Note the order in which the dates are returned: single date-time values are returned first, followed by exploded date-time ranges. The return value is a text list.
    @Explode([07/01/94]:[10/01/94 - 10/03/94]:[05/01/94]:[04/01/94 - 04/03/94])
  12. You might want users to be able to enter a range of dates into an editable, multi-value, time-date field called Duration and display them in a computed, multi-value, text field called Days. Give the Duration field the following input-translation formula: @Date(Duration). Give the Days field the following formula: @Explode(Duration). Users can enter dates into the Duration field in this format: 04/16/71-04/18/71.