Array to String in Server Connect

So I’m looking to add a csv export button on a page. The server connect file for the page uses a repeat to get 2 sets of nested data. I’m struggling with getting the nested elements to collate as a comma separated string for the csv export.

There looks to be 2 options, and the most likely seems to be creating a temp table to add the export data to and then retrieve it for the export. The other combining csv files of each query.

I’ve tried a few iterations to get the data in the temp table, the issue is joining the programmes/permissions into a string to insert into a single column in the db which keeps returning an array to string conversion error.

Here’s a couple of examples of what I’ve tried taken from other posts across the forum.

image

Taken from here:

I’m sure it’s a simple solution but I can’t see it for looking at the moment! Can anyone point me in the right direction?

Thanks!

After quite a lot of trial and error I’ve got this working.

The circled step returns:

as the value for permissions which I can then insert in the field in the export table.

This isn’t possible with the UI pickers it gives the line underneath labelled ‘permissionsUI’ which returns empty…

This means I can now export a table like this:

Into this in Excel/csv: