Add bullets to a list from DataBlaze

I'm inserting a text block from DataBlaze.

using {=replace(assumptions, ".", ".\r\n")} to replace periods in the text string with periods and then line breaks to make a list.

This list appears looking like this:

Onboarding emails
Kickoff meeting
Setup on software
20 extra hours of setup and customization

I want each line to have a bullet at the start but in the current implementation, only the first line has a bullet. How would I get each line to have a bullet?

Thanks.

Hey Jonathan,

Welcome to the community!

I think how you approach this depends on exactly how the data is being pulled from Data Blaze. You said that it's coming in as a string, but there are portions of that string that you can use to break it into component parts.

If that's the case, I would approach this a little differently:

Let's say I bring in the string from Data Blaze that you're describing as a variable called assumptions:
{assumptions="Onboarding emails. Kickoff meeting. Setup on software. 20 extra hours of setup and customization."}

assumptions is a single string where each item you want to break out is separated by a period and a space. Rather than using the replace function you're using, I could instead turn that string into a list of items, breaking the string by period & space:
{listversion=split(assumptions, ". ")}
{=listversion}

From there, I could use repeat with list comprehension to transform each item in my list:

{repeat: for item in listversion}- {=item}
{endrepeat}

Would that accomplish what you're looking for?

1 Like

Andrew - thanks for your quick reply. You've really helped me get closer.

Now I'm having a problem with the two lists getting confused / overlapping.

Here's my text:

Key Assumptions:
Our estimate is based on these assumptions:
{listversion=split(assumptions, "|")}
{repeat: for item in listversion}- {=item}
{endrepeat}

The one-time setup fee includes:
{listversion=split(setup fee includes, "|")}{repeat: for item in listversion}- {=item}
{endrepeat}

The output is the same list repeated twice. It's as though it's not clear which listversion to use. Is there a way to clear it after the first or differentiate them?

Key Assumptions:

Our estimate is based on these assumptions:

  • Onboarding emails.
  • Kickoff meeting.
  • Setup on software system.

The one-time setup fee includes:

  • Onboarding emails.
  • Kickoff meeting.
  • Setup on software system.

--

Also, is there a way to use actual indented HTML style bullets so that the second lines will wrap?

@Jonathan_Burns the issue with things being duplicated is that you're trying to save both your first and second list as the same variable, listversion. For the one that's splitting the "setup fee includes" string, change {listversion= to anything else, even {listversion2=. Then, in the {repeat} command, update listversion to match whatever you new variable is.

{note: preview=no}{assumptions="Onboarding emails. Kickoff meeting. Setup on software. 20 extra hours of setup and customization."}
{`set up fee includes`="sentence 1. sentence 2. sentence 3"}
{listversion=split(assumptions, ". ")}
{listversion2=split(`set up fee includes`, ". ")}

{endnote}{repeat: for item in listversion}- {=item}
{endrepeat}

{repeat: for item in listversion2}- {=item}
{endrepeat}

For the second question about using the HTML bullets... I tested that by putting my {repeat} command on a bullet point and it does work, but the spacing comes out a little funky for me. I wonder if anyone else has a suggestion for that? Here's what I mean by funky spacing:

{note: preview=no}{assumptions="Onboarding emails. Kickoff meeting. Setup on software. 20 extra hours of setup and customization."}
{`set up fee includes`="sentence 1. sentence 2. sentence 3."}
{listversion=split(assumptions, ". ")}
{listversion2=split(`set up fee includes`, ". ")}

{endnote}{repeat: for item in listversion}

  • {=item}
{endrepeat}

{repeat: for item in listversion2}- {=item}
{endrepeat}

PS: i ended up wrapping all the initial variables in a {note: preview=no} and {endnote} tag to hide the variables we were defining and not get those extra spaces put into my snippet results.

Thanks very much Andrew. I'll try that.

Hi @Jonathan_Burns ,
To add to andrew's response, here is a snippet to use editor's bullets without spaces.

{note: preview=no}{assumptions="Onboarding emails. Kickoff meeting. Setup on software. 20 extra hours of setup and customization."}
{`set up fee includes`="sentence 1. sentence 2. sentence 3."}
{listversion=split(assumptions,". ")}
{endnote}

  • {repeat: for (item, index) in listversion}{=item}{if: index < count(listversion)}
  • {endif}{endrepeat}
4 Likes

Vinod - your solution worked perfectly. It looks perfect! Thank you so much! I would never have figured this out without you.

1 Like