Assigning company.custom.variable to another variable

Hi there, I have the following problem. This code works fine:

{% assign str_EconomischeBegunstigden = "1902141|Frank Vlayen |Muizenhoekstraat|||++1902142|Saskia Schatteman|Muizenhoekstraat|||" %}

{% assign arr_EconomischeBegunstigde = str_EconomischeBegunstigden | split:'++' %}

{% stripnewlines %}

{% newline %}
| {% comment %}kolom 1{% endcomment %}
nr
| {% comment %}kolom 2{% endcomment %}
bron
| {% comment %}kolom 3{% endcomment %}
soort
| {% comment %}kolom 4{% endcomment %}
opmerkingen
| {% comment %}kolom 5{% endcomment %}
Naam
| {% comment %}kolom 6{% endcomment %}
Adres
| {% comment %}kolom 7{% endcomment %}
Geboortedatum
| {% comment %}kolom 8{% endcomment %}
Startdatum
| {% comment %}kolom 9{% endcomment %}
Einddatum

{% newline %}
| {% comment %}kolom 1{% endcomment %}
:--5%--:
| {% comment %}kolom 2{% endcomment %}
:--5%--:
| {% comment %}kolom 3{% endcomment %}
:--5%--:
| {% comment %}kolom 4{% endcomment %}
:--20%--:
| {% comment %}kolom 5{% endcomment %}
:--20%--:
| {% comment %}kolom 6{% endcomment %}
:--20%--:
| {% comment %}kolom 7{% endcomment %}
:--10%--:
| {% comment %}kolom 8{% endcomment %}
:--10%--:
| {% comment %}kolom 9{% endcomment %}
#

{% for EconomischeBegunstigde in arr_EconomischeBegunstigde %}
{% assign EconomischeBegunstigde_Informatie = EconomischeBegunstigde | split:'|' %}
{% assign namespace = EconomischeBegunstigde_Informatie[0] | replace:' ', '_' %}

{% newline %}
| {% comment %}kolom 1{% endcomment %}
{{forloop.index}}
| {% comment %}kolom 2{% endcomment %}
Sync (VGD)
| {% comment %}kolom 3{% endcomment %}
opzoeking
| {% comment %}kolom 4{% endcomment %}

| {% comment %}kolom 5{% endcomment %}
{{EconomischeBegunstigde_Informatie[0]}}

| {% comment %}kolom 6{% endcomment %}
{{EconomischeBegunstigde_Informatie[1]}}

| {% comment %}kolom 7{% endcomment %}
{{EconomischeBegunstigde_Informatie[2]}}

| {% comment %}kolom 8{% endcomment %}
{{EconomischeBegunstigde_Informatie[3]}}

| {% comment %}kolom 9{% endcomment %}
{{EconomischeBegunstigde_Informatie[4]}}

{% endfor %} {% comment %}EconomischeBegunstigde{% endcomment %}

{% endstripnewlines %}

First, the split is according to ‘++’, then to ‘|’ (this works fine). However, the following code doesn’t (very similar to the first, except that ‘str_EconomischeBegunstigden’ is the result of another variable ‘company.custom.EconomischeBegunstigden.DelimitedString’, which is given to the template by an API call.

{% assign str_EconomischeBegunstigden = company.custom.EconomischeBegunstigden.DelimitedString %}. The variable ‘company.custom.EconomischeBegunstigden.DelimitedString’ has exactly the same contents as ‘str_EconomischeBegunstigden’, but here, the second split (according to ‘|’ does NOT occur.

Can you help me here?

Hi Bart

I took a look at your question, but I’m a little bit confused. Which (part) of the code doesn’t work?
For now, I only see the code that works fine. Can you paste the code that doesn’t work?

Thanks in advance.

Sofie