# Rule action: Split text to list

Used for: creating a list from a field that contains multiple values (separated by a certain character).

Used in: "THEN"-statements and "ELSE"-statements.

You need a list in a field if you want to use rules that operate on lists (for example: slice list, split products, sort list). The "Split text to list" rule can create this list for you.

To create a list in a field, that field must contain multiple values separated by a specific character. Examples of such field values:

* XXS, XS, S, M, L, XL, XXL
* 32; 33; 34; 35; 36
* 8719322525833|8719322525468|8719322521125|8719322527776|871932252390

Using the "Split text to list" rule you choose which character to split on (e.g., comma, semicolon, or pipe). The rule creates a list element for every separated value. For example, the screenshots below show splitting a field containing sizes (separated by comma) into a list.

<figure><img src="/files/213b64ac0b9f0a7b0fb63f3bca4eb90c52a717de" alt=""><figcaption></figcaption></figure>

This is what the "size" field looked like before this rule:

<figure><img src="/files/0c8089747ce0d4e78f4f3c9f470bb76a4761ef9f" alt=""><figcaption></figcaption></figure>

And this is what that same field looks like after applying the rule:

<figure><img src="/files/be15536daf3a03cf4fc01d930a7df03fefe821ee" alt=""><figcaption></figcaption></figure>

After this you could, for example, use the Split products rule to create a product for each size in the list.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helpcenter.channable.com/manage-improve-product-data/rules-bulk-edit-and-enrich/how-to-use-actions-then-in-rules/rule-action-split-text-to-list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
