Using the ARRAYTOCSV function

The ARRAYTOCSV() function is to convert data in the form of an array to a CSV format. This is typically useful for cases like where you want to send Slack Message as a sprint and not as a list of items, then in that case you can make use of the function. At times you may want to add or update the record as a string and not an array for the respective column in databases like those in MySQL, MongoDB and so on. Then in that scenario converting your array to a CSV is always beneficial.

Syntax

ARRAYTOCSV(ArrayValue)

Where

  • ArrayValue will be the data array

Let us take a simple example here to select cities from a checkbox control and view the data in a text control. We have enabled Show Raw data in this case. Now note the output on selection of multiple cities. It is an array that is returned here.

Let us add an Action flow to show the string as a Popup. Add a compute block to the action flow. To the variable assign the value returned by ARRAYTOCSV. Use keywords and display the value in the Popup.

Formula: In this example, we are using the **citiesvisited ** which returns the selected options of checkbox control.

Now if you take a preview of the form note the output in the popup block where we used the variable in the Message field.