Loading

How to Split a Field by a Specific Character and Add Results as New Rows

Veröffentlichungsdatum: Dec 22, 2025
Aufgabe

Transform input data containing a delimited string in a field (e.g., [Order Date]) into separate rows for each value. This method applies to any specific character or string, not limited to commas.

Example Transformation:

  • Before: OrderID "b" with Order Date "2025/12/02, 2025/12/03"
  • After: Two rows for OrderID "b" with "2025/12/02" and "2025/12/03" respectively.

Sample Data

Schritte
Follow these steps to split the field:
  1. Create a calculated field to extract the part to the left of the comma (e.g., retrieve "2025/12/02").
    TRIM( SPLIT( [Order Date], ",", 1 ) )
  2. Create a calculated field to extract the part to the right of the comma (e.g., retrieve "2025/12/03").
    TRIM( RIGHT([Order Date], if(FINDNTH([Order Date],",", 1) > 0) then LEN([Order Date]) - FINDNTH([Order Date],",", 1) - LEN(",") + 1 else 0 end) )
  3. Use the Pivot function to merge the columns created in steps 1 and 2.
  4. Retain only the merged column and the "OrderID" field.
Zusätzliche Ressourcen

For more information, see the attached sample flow "How_To_Split_And_Add_As_New_Rows.tflx".

Nummer des Knowledge-Artikels

003962197

Anhänge

How_To_Split_And_Add_As_New_Rows.tflx

11 KB

 
Laden
Salesforce Help | Article