Datadefinitions export Multiselection


How can I export Multiselection fields with Datadefinitions export?

This field contains an array and I tried to export it with the iterator interpreter but no succes so far.

How can I export this fieldtype?

Also with an implode expression I get only the word Array in the export.

Any help would be appreciated.

What export type? csv, excel, xml?

The implode definitely will solve the problem, you just have to do it at the right spot.

Export to csv. I tried several places, but always the same result: error or Array in the export.

can you show the config?

At the moment I have just configure expression with implode(",", value) I get: [php] Warning: implode(): Invalid arguments passed [“exception” => ErrorException { …}]

might it be that your value is sometimes null?

that’s correct. Guess that’s the problem? Is there a way to get rid of these warnings?

no, just do it properly:

value ? implode(',', value) : ''

This is working for a normal multiselection field but when it’s inside an objectbrick I get the same warnings again.

Is there also a solution for this part?

In that case I would propose to create your own “ObjectbrickGetter”.

Why do you suggest to make something custom for the most basic thing?
This is nothing special and should work with the default set of tools in Datadefinitions.

  1. that is how the plugin is designed: create custom stuff
  2. use the object-brick getter given by the plugin
  3. if you have a bug, file a ticket on github please