Use data from DataBlaze

Hey everyone!

First of all, I want to thank you for all the help so far. :smiling_face_with_three_hearts:

I am trying to use DataBlaze for a specific task but will simplify the request to make it easier to understand.

Let's say I have this table:

How can I add a snippet that says:
John is 12 years old.
Sally is 24 years old.
Mary is 54 years old.

And, if in the future I have a new DataBlaze grid, I'd like to update the URL (9F3HPUnv23Kc-jnJNZevs07EnLhgKnEj9ztl5PCVV1I) to the new one and fetch the information from the exact same place.

For example, I have created this new grid:

I now want to update the code in my snippet to the new URL and once I use that, it will display:
Bob is 20 years old.
James is 95 years old.
Mindy is 15 years old.

So, it's a 2-part question.

  1. How to get the name and age for each one within the text.
  2. How to update the URL, but keep the location of the cells (which I assume is easy).

Thanks a lot!

Here is an example how to read data from a table

This is how I did it

  • I used Read from table command
    image
  • Selected the table, columns to read. Associated a form name, turned on multiple rows and turned of menu.
    image
  • Once the command is inserted, I selected the form name in the chip and inserted table.
    image
  • You can also use Insert repeat to customise the results.

About changing the Table name or Space name, you can select the chip and change the options accordingly.
image

1 Like

Thank you for your help. This has helped me better understand how the Tables work. However, if I want just one of the results, let's say, Sally's age. How can I select just the cell that says her age (which is 22)?

I'm used to working with Google Sheets, where you can simply select cell B2 and be done with it. This is quite new for me.

Thanks

You can use the menu option

In the snippet Use a single row from menu,
I used menu=yes and multiple=no to select an item from the list
image

Or in the snippet Use a single row
I used menu=no and multiple=no and also added a where condition
image

1 Like

Thank you but I don't think that this will work for what I need. I will think of another way of going about it and ask here if I need assistance.

Appreciate all the help so far.

Thanks for letting us know. Just wanted to check one thing: Vinod's post has multiple snippets, have you noticed the second one?

image

As you can see in the image, we are able to select Sally from the menu and print her age. Let us know if that's not what you were looking for.

Yes, I saw that, but perhaps my initial explanation was not correct.

Imagine that I have a Google Sheet with lots of information for an online event. It has the episode title in one cell, and the URL in another cell, for 10 different episodes.

I'm trying to create a snippet that will autofill this information.

For example:

Access Episode {episodeNumber} - {episodeName} here {episodeURL}.

In my snippet, it will have an IF formula that will display the correct episode information, based on the day.

Right now, I have this:

{if: {time: DD} = 7 AND {time: HH} > 0}Episode 1 is now live, and you can access it via this alternative link:
'Nature’s Prescription: DIY Remedies for Inflammation'
youtube.com/watch?123123123123

Each episode is available for 24 hours from 8 PM (EST), until the next one comes live! 
{elseif: {time: DD} = 8 AND {time: HH} > 0}Episode 2 is now live, and you can access it via this alternative link:
'Microbiome Medicine: Uncover the Secrets of Your Inner Ecosystem'
youtube.com/watch?6786786786786

*etc.......*
{endif}

What I am trying to do is automate this so that the next time we have a new series, we don't need to manually change all the titles and URLs, and we can just take that from a Google Sheet or DataBlaze.

If this was used cell numbers, I could do something like:

Access Episode {A1} - {A2} here {A3}, depending on where the information was.

Then, when we had a new series, I could simply change the source of the information and update everything. I'm not sure I'm explaining myself well, so please let me know if you understand this or not.

I think you can do this in Data Blaze. Right now, we have three columns: episodeNumber, episodeName, episodeURL. In your case, we can add one more column: seriesName - this is the name of the series for which you want the information. When a new series arrives, you can append its data to the Data Blaze spreadsheet, and put the new seriesName in all its rows.

Then in your snippet, while selecting, you can use a formula to determine the correct episode number (based on the time), and then you can manually choose the seriesName that you want (or default to the latest one).

Something like this example (try inputting the seriesName between alpha and beta, and watch the result change):

{note}Choose the latest series:
{dbselect: select seriesName from example group by seriesName order by seriesName; menu=yes; space=id}

add more conditions here
{episode_number=0; trim=yes}
{if: {time: DD} = 7 AND {time: HH} > 0; trim=yes}{episode_number=1; trim=yes}
{elseif: {time: DD} = 8 AND {time: HH} > 0; trim=yes}{episode_number=2}
{else: trim=yes}{episode_number=3}
{endif: trim=yes}{endnote: trim=yes}
{if: episode_number > 0;trim=yes}
{dbselect: select episodeLink,episodeName,episodeNumber from example where episodeNumber=@episode_number and seriesName=@seriesName; space=id; isloading=isloading}
{if: not isloading}
Episode {=episodeNumber} is now live, and you can access it via this alternative link:
Name: '{=episodeName}'
Link: {=episodeLink}
{else}Loading...
{endif}
{endif}

Let me know if it works for you.