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?
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.
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.
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.
Here are the results that I received.
Maybe try this instead?
<<CONCATENATE(" - ", SUBSTITUTE([Result], " , ", "<br/> - "))>>
Unfortunately, the line break code is simply added as a text string.
Here is my code for reference as seen from the template.
This is the result.
One option you could try is , please have that code in a VC and use that VC in the template.
User | Count |
---|---|
25 | |
14 | |
4 | |
3 | |
3 |