Documentero - Creating a Table of Values

I have been fumbling around with this for far too long now - I really hope someone can shed some light on this for me:

I want to use Documentero to create Word (Template) Document which will contain a table of values from one of my bubble data tables. You would think that that would be a simple step but - far from it!

I have a data table (let’s call it “AssessmentData”). It contains an email address and 3 other text/number fields. I want to extract the records relating to a specific email address and populate them into a Table in a Word Template in Documentero. This means finding the right combination of “Do a Search for…”, filtering the data on an email address - and then applying the correct JSON formatting to get the (3) columns and associated rows into a Table into my Word Template, using JSON placeholders ({#items}, etc.)

I won’t bore you with all the ways that I have discovered it is NOT done - I could really use some help on how it IS done!

Thanks!

I am guessing the search for and filter part should be straight-forward. What you should do to produce JSON is use format as text after you have the filtered list. However, this action combines each list item in a way you want and join them with a delimiter. If you want to append something to the beginning, you should start the expression with some Arbitrary Text.

For example, if you want to generate some json like below:

{
  "email": "something@something.com",
  "fields" : [
    { "name1": "value1"},
    { "name2": "value2"},
    { "name3": "value3"}
  ]
}

You should start with an Arbitrary Text that has

{
  "email": "something@something.com",
  "fields" : [

Then, append Do a Search for Something:filtered etc etc: format as text to it.
In the format as text, you will do this for each line:

 { "This Thing's name": "This thing's value"}

With a delimiter of comma ,.

Finally, you will append this to conclude json:

 ]
}

I hope it gives you some idea :slight_smile:

Thank you - I will try to get my head around this tomorrow and report back!

I understand your approach and I appreciate your notes, but it doesn’t really solve my issue of trying to create table-style data with data extracts from bubble. Here is my current JSON:

image

The FullResultsList… elements produce comma-separated values (thing1,thing2,thing3), where I have joined them with Arbitrary Text “,” (without the quotes).

What I am trying to do is to have Documentero read the JSON as rows of data in a Table. My template (incorrectly) looks like this:

image

…and the (incorrect) output looks like this:

image
(There are 4 matching records in the underlying search criteria)

When I want it to be displayed like this:

I hope this helps to explain my issue better? Thank you for any pointers anyone has!

It looks like you should structure your data differently for that expected output in documentero. Check the documentero documents to find out what is the expected format for this.

But I am guessing the last 3 elements in your json should be some kind of inside an array. So, instead of passing them one by one, you should pass them as a row.

Documentero documentation will tell you how.

Sadly that is the point of my post here - Documentero does not have insights on how to achieve this, from bubble… :confused:

It doesn’t need to explain how it is done in Bubble. This video shows some sample JSON.
For example, this json:
image
produces this document using the guy’s template:
image

See how he put the products inside an array in json. You should do the same for your FullResultsList.

Ah I see - thank you - I will try it out!

This topic was automatically closed after 70 days. New replies are no longer allowed.