In psych - have drop down for general education where I select topics reviewed. I would prefer this to be listed in a list format with dashes / bullets instead of a paragraph format separated by commas on same line. Any recommendations?
Hey @NDa , welcome to the Text Blaze community.
This is possible through the join function.
When you have a multi-select dropdown, the values you choose are stored as a list, which is formatted [like, this, with, each, value, separated, by, a, comma, and, enclosed, in, brackets].
The join function tells Text Blaze how to parse that list. You tell it what list to look at (the name of the dropdown field) and then how you want to separate its values.
If you put the dropdown itself inside of a note command, the dropdown menu won't be displayed and only the joined version of it will be. Anything inside the note (the menu) will display when using the snippet but won't end up in the final text that's generated.
Here's a list of general education topics that we reviewed together: {note}{formmenu: default=thing; another thing; yet another thing; more things; even more things; final thing; name=topics reviewed; multiple=yes}{endnote}
- {=join(`topics reviewed`, "\n - ")}
Here's a second way to do it which avoids using the note approach. Instead, we're using the formatter
option of the formmenu to indicate the same join, just done slightly differently.
This previews like it's all a single line, but when you insert the text it'll be a bulleted list:
Here's a list of general education topics that we reviewed together:
- {formmenu: default=thing; another thing; yet another thing; more things; even more things; final thing; name=topics reviewed; multiple=yes; formatter=x -> join(x, "\n- ")}