Question
How can I transform a csv list to a bulleted item list using
SpreadSheetPlugin
Environment
I try to display the elements of a csv list as a bullet list but I can't get it work.
I expect the csv list to be stored in a variable.
Take the the WEBFORMS variable from the Sandbox web:
WEBFORMS =
WebForm,
ContactForm,
ItemToDoForm,
TestTextAreaForm,
WebPreferencesForm,
TutorialTableForm,
BackslashBrokenForm,
ChangeRequestForm,
ChangeProposalForm,
TranslationForm,
TestFormWithAccents,
GathererForm,
UseCaseForm,
ProjectWeeklyReportForm,
SelectMultiForm,
MultipleCheckboxTestForm,
BeatlesFanForm,
NewArtcleForm,
MKResearchForm,
KnownErrorForm,
CustomersProjectTemplateProjectMinutesFormPageToUse,
CustomersProjectTemplateProjectAgendaFormPageToUse,
CompilerInfoMapForm,
SampleForm
This is what I want to have:
Here is what I'm trying to do:
%CALC{$TRANSLATE($LISTMAP($CHAR(9)* $item, %VAR{"WEBFORMS" web="Sandbox"}%), $comma, $CHAR(10))}%
The result is, however:
*
WebForm
*
ContactForm
*
ItemToDoForm
*
TestTextAreaForm
*
WebPreferencesForm
*
TutorialTableForm
*
BackslashBrokenForm
*
ChangeRequestForm
*
ChangeProposalForm
*
TranslationForm
*
TestFormWithAccents
*
GathererForm
*
UseCaseForm
*
ProjectWeeklyReportForm
*
SelectMultiForm
*
MultipleCheckboxTestForm
*
BeatlesFanForm
*
NewArtcleForm
*
MKResearchForm
*
KnownErrorForm
*
CustomersProjectTemplateProjectMinutesFormPageToUse
*
CustomersProjectTemplateProjectAgendaFormPageToUse
*
CompilerInfoMapForm
*
SampleForm
What would be the correct way to get those bullets?
--
AttilaPeter - 16 Sep 2005
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
You are on the right track. There is a problem because the parser strips leading whitespace. It works if you use $LISTJOIN to join the lines with newlines. Here are two options:
Use just a $LISTJOIN:
Use $LISTJOIN and $LISTMAP:
View
raw text
--
PeterThoeny - 20 Sep 2005
That was I was looking for... I did not have the newest version of the plugin so the
LISTJOIN function was missing from my installation :-(.
Thanks!
--
AttilaPeter - 20 Sep 2005