Regarding the Drag & Drop editor

  • 8 January 2024
  • 7 replies
  • 64 views

Badge +1

Hi

I have run into an issue, i have en custom property called shipments, this property is containing an array with info for each package with track & trace information..

The issue here is, how do i fetch the array data? have tried the following

{% for package in person|lookup:"shipments" %}{{ package }} {% endfor %} but nothing is getting printed…

The raw data looks like this 
{"Ordrexxxxx":[{"dropPoint":"Selected Droppoint","trackingCode":"000000000","trackingUrl":"https://gls-group.eu/DK/da/find-pakke?match=0000000000","shipper":"GLS Droppint","amount":1}]


7 replies

Badge +1

Have tried the following aswell… no output at all

{{ person|lookup:"shipments"|list_to_string }}

Badge +1

Really no one got a helping hint here?

Userlevel 5
Badge +17

Hi @RetouchedDK ,

I really don’t know a lot about this issue, but I’m wondering if you have tried replacing the double quotes around shimpents with single quotes? Also make sure the quotes are the straight kind and not the curved kind, that has caused a problem for me in the past. And if you haven’t read it yet, this article helped me with customized personalization tags

Best of luck!

Badge +1

@JessFosnough - Hi thanks for the reply…

I found the issue and how to solve it, with the standard profile pre-selected in the preview template it dosen’t have access to the custom properties, but if you search the same profile up with the e-mail it suddenly have access to all the data.

Badge +1

@JessFosnough but know i have run into another issue

"Ordrexxxxx":[{"dropPoint":"Selected Droppoint","trackingCode":"000000000","trackingUrl":"https://gls-group.eu/DK/da/find-pakke?match=0000000000","shipper":"GLS Droppint","amount":1}]

That is the items i get out of 

{% for item in person|lookup:"shipments" %}
<div>{{ item }}</div>

{% endfor %}

but i need to loop the array thru the nested item [{"dropPoint":"Selected Droppoint","trackingCode":"000000000","trackingUrl":"https://gls-group.eu/DK/da/find-pakke?match=0000000000","shipper":"GLS Droppint","amount":1}]

right now i have tried 
{% for orders in event|lookup:item|lookup:'0' %}</div>
<div>{{ orders }}</div>
{% endfor %}

but that just returns the first letter like
O
r

D

r

e

x

x

x

x

x

Userlevel 5
Badge +17

@RetouchedDK - I’m going to do some testing in my account to see if I can figure it out, I’ll get back to you as soon as I can.

Userlevel 5
Badge +17

@RetouchedDK  - A few questions for you:

1 - is Ordrexxxx part of the array, or the name of the field?

2 - is the field an actual event, or is it a custom property that is populated in another way, ie, by import?

So far I have only been able to replicate what you have done. Also, I have only been able to replicate it by using person|lookup, because it is not an event in my account.

Reply