How to separate List items with line break when list is obtained from Return Value of JSON webhook

I have a bot that is calling a webhook. The Return Value [result] has type LIST. The [result] is then displayed in a Google Doc template using <<[result]>>. 

The final result appears as a list with about 10 elements. The elements are comma separated, but not line break separated. How do I achieve line break separation of my list in the Google Doc template?

Ricky_Chua_0-1727051458308.png

I have attempted the following:

- using <<Start: [result]>> and <<End>> commands but the error message says [result] is not the key column like the regular AppSheet child tables. 

- Looking for a function to split my list at the commas. Didn't manage to find one.

0 7 405
7 REPLIES 7

Hi Richy, 

can you test the following code?

CONCATENATE(" - ", 
  SUBSTITUTE([Result], " , ", "
 - ")
)

 

Thank you for the suggestion.

I placed your suggested code into the Google Doc template. The result was the separator has been changed from " , " to " - ". However there are still no line breaks between the list elements.

Attached is the image of the result. I have circled the separators in red.

Ricky_Chua_0-1727136636243.png

 


Note that the line breaks @jballester included in his expression must also occur in your template.

Please post a screenshot of the relevant part of your template to troubleshoot further.

Here is a screenshot of the template expression. For testing purposes, I have [api_result] below @jballester code. 

Ricky_Chua_0-1727221655755.png

Here are the results that I received. 

Ricky_Chua_1-1727221815751.png

 

Maybe try this instead?

<<CONCATENATE(" - ", SUBSTITUTE([Result], " , ", "&lt;br/&gt; - "))>>

Unfortunately, the line break code is simply added as a text string. 

Here is my code for reference as seen from the template.

Ricky_Chua_1-1727362011668.png

This is the result. 

Ricky_Chua_0-1727361890851.png

 

One option you could try is , please have that code in a VC and use that VC in the template.

 

Top Labels in this Space