---
title: "system.mes.spc.analysis.encodeList(list)"
id: "system-mes-spc-analysis-encodelist-list"
project: "MES User Manual"
url: "https://docs.sepasoft.com/articles/user-manual/system-mes-spc-analysis-encodelist-list"
updated: 2026-07-31T14:55:44Z
---

# system\.mes\.spc\.analysis\.encodeList\(list\)

**Sepasoft MES Module Suite**

### system.mes.spc.analysis.encodeList(list)

Encode the specified java List into a single string separated by the pipe (|) character.

| ![Warning](/resources/Storage/user-manual/user-manual/Warning.png) | **Scripting Function modifications in**<br><br>MES 3.79.3 RC 5 and later<br>MES 3.81.4 RC 5 and later |
| --- | --- |

Syntax
 
system.mes.spc.analysis.encodeList(list)

* Parameters

List&lt;String&gt; **list** - An instance of a java List object containing string values.

* Returns

String - A single string containing all of the items from the list.

* Scope

All

Code Example

```python
locationPath = 'Enterprise\El Dorado Hills\Packaging Area\Packaging Line 1\Inspection Station 1'

startDate = system.mes.spc.analysis.formatDate(system.date.addHours(system.date.now(), -1))
endDate = system.mes.spc.analysis.formatDate(system.date.now())

definitionName = 'Case Inspection'
attribute = 'Fill Level'

controlLimits = 'CpPpUSL,CpPpLSL,PpTarget'
signals = ''
dataFormatName = 'Process Capability and Performance'
filters=''

spcsettings = system.mes.spc.analysis.createSettings(definitionName, attribute, filters, controlLimits, signals, dataFormatName)

filter = spcsettings.encodeList(['FromDate='+startDate,'ToDate='+endDate,'Location='+locationPath])
spcsettings.setFilters(filter)

results = system.mes.spc.analysis.getSPCResults(spcsettings)

ds = results.getTableResults()
print ds
print ds.getColumnNames()

for row in range(ds.getRowCount()):
	for col in range(ds.getColumnCount()):
		print ds.getColumnName(col),ds.getValueAt(row,col)
```


**Sepasoft MES Module Suite**