[copied from GT FB group]
When showing answers stored in collections to users, a comma appears (",") and I don't know why. If anyone can shed some light on this, it would be much appreciated!
I'm working on a program where users are asked to pick their answers from a checklist (*question; *type: checkbox
). The user also has the option to type in their own things (adding things not in the checklist) in a separate question (*question
).
Their answers from the checklist are saved as a collection (1), and their answers from the optional question are saved as a different collection (2).
Later in the program, I want to repeat the answers back to the user (i.e. show them the answers stored in the collection(s)). If they added anything for the optional question that means collections (1) and (2) will both be repeated to the user. If they didn't add anything for the optional question, only collection (1) will be repeated to them.
When repeating the answers back to users - simply by typing the name of the collection(s) in curly brackets "{}" in GT - a comma appears at the end of the last item of the collection when users DID NOT add anything for the optional question (if they added their own item(s) for the optional question, then no comma appears).
I don't know how to avoid this comma from appearing without removing the comma separating the two collections in the code (which I don't want to do, as that means no comma separating the last item of the collection (1) and the first item of the collection (2) when shown on screen).
Does anyone know how to get rid of this comma (in the event that no optional answers are added by the user) while still being able to show answers in this way?