I. About the ARRAYJOIN function
ARRAYJOIN function: Merges elements in an array or list into a string using a specified symbol. This function needs to be used in conjunction with the LIST function.
Example: ARRAYJOIN(LIST("A","B","C"),"-") = A-B-C
- Function formula: ARRAYJOIN(array, [separator])
- Parameters
- Array: Array to merge.
- Separator: The symbol for merging each element in the array; the default is a comma.
- Usage scenarios
- Merge options in a multiple-option field
- Separate information using newlines or other custom symbols
II. Examples
Merge options in a multiple-option field
Scenario: If you need to combine several options in a multiple-option field, you can use the ARRAYJOIN function to merge the contents of each option. As shown in the figure below, you can use the ARRAYJOIN function to combine the fields of expertise or passion of each guest into the same cell.
Formula: ARRAYJOIN([Field of Expertise or Passion]," & ")
250px|700px|reset
Merge the contents of different fields
Scenario: In a bug management table, ARRAYJOIN and LIST can be used to combine information for each bug, such as the device/system, bug type, and repair priority.
Formula: ARRAYJOIN(LIST([Device],[Priority],[Terminal])," - ")
250px|700px|reset
Separate multiple items of data
Scenario: Collate specific data from other tables for easy viewing. In the following example, the names of the customers each member is responsible for are synced from the Sales to the Customer table, and displayed on separate lines.
250px|700px|reset
Formula: ARRAYJOIN([Sales].FILTER(CurrentValue.[Sales representatives]=[Sales person]).[Customer name],CHAR(10))
250px|700px|reset