> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-replace-values-with-different-text/picklist-values-replace-semi-colon-with-comma.md).

# Picklist Values: Replace Semicolon with Comma

Fields that return semicolon-delimited values can be cleaned up at render time.

{% hint style="info" %}
Use `#COMMA#` when the replacement value must contain a literal comma.
{% endhint %}

### Problem

The `replaceall` attribute uses commas to separate each search and replacement value.

If you enter a literal comma as the replacement value, S-Docs reads it as part of the attribute syntax.

That means a pattern like `replaceall=";,,"` does not work as expected.

### Solution 1: Replace semicolons in a merge field

Use this pattern when you output the field directly in the template.

{% code title="merge-field-example.txt" %}

```
{{!docsight1.General__c replaceall=";,#COMMA#"}}
```

{% endcode %}

#### Example

**Field value**

```
Alpha;Beta;Gamma
```

**Rendered output**

```
Alpha,Beta,Gamma
```

### Solution 2: Replace semicolons in a related list column

Use this pattern when the field appears inside `lineitemsSOQL`.

{% code title="related-list-column.xml" %}

```xml
<column replaceall=";,#COMMA#">docsight1.General__c</column>
```

{% endcode %}

#### Example

{% code title="related-list-example.xml" %}

```xml
<lineitemsSOQL>
  <soql>
    SELECT docsight1.General__c
    FROM Your_Object__c
    WHERE Parent__c = '{{!Parent__c.Id}}'
  </soql>
  <column replaceall=";,#COMMA#">docsight1.General__c</column>
</lineitemsSOQL>
```

{% endcode %}

**Field value**

```
Alpha;Beta;Gamma
```

**Rendered output**

```
Alpha,Beta,Gamma
```

### Token reference

Use this token when a replacement value needs a comma.

| Token     | Represents |
| --------- | ---------- |
| `#COMMA#` | `,`        |

### Related articles

* [How to Replace Values with Different Text](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-replace-values-with-different-text.md)
* [Merge Fields With Template Editor](/sdocs/template-architecture/inserting-merge-fields/merge-fields-with-template-editor.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.sdocs.com/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-replace-values-with-different-text/picklist-values-replace-semi-colon-with-comma.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
