Pull data from a Google Spreadsheet to Hype

If I understand you correctly then the answer is yes but no.

What I mean is yes it can be done but you would not generate new hype elements without cloning.

But for the idea of what you may need to do:

Code that polls and gets the sheet json every #minutes.
Code that iterates over the json.
Code that adds the entries.
In my case I avoid cloning and generate a table into an existing Hype element. The table cells will hold the new data.

You can see an example of this at http://ourmusicradio.com/
Click the Schedule button.

This is subjectively involved codewise to go into here but I will be putting up a special events button shortly that will be more dynamic ( not set days). If I get a chance I may break out some of the code and post here but no promises and also no promise will go into a lot of detail or help further at the mo. And remember this type of coding is subjective to data, display. So one thing including the fetch code will not work for all.

3 Likes

Mark you are fantastic. However, please hold because I am one of those who won’t have the full mental capacity to reach the All-Aboard on your Thought Train! In the meantime (hack that I am), I found in Google Design Studio that I can use their data engine to populate into graphics for embed into my hype doc…including tables and more. Since I’m using a G-Sheet to collect, this maybe easier for me at this time. However I am excited that I could actually understand a bit of the logic you did here and thank you for that! You guys who get this stuff, I am very grateful and impressed.

1 Like

@MarkHunte turned the stream on -> nice relaxing music -> like

1 Like

@h_classen, @jonathan , @Daniel

My Brother should be giving you guys a shoutout on the radio station between 3pm-5m tomorrow (Uk Time )

4 Likes

i’ll turn the stream on :wink: funny thing :slight_smile:

1 Like

In about 10mins…the shoutout…

1 Like

ha ha :slight_smile: got it! thx Mark

1 Like

Ha,ha no probs. Recorded it just incase you missed it.
He took a sec there to get his head around what he was saying… :laughing:

yeah, noticed it too … :slight_smile:

1 Like

:roll_eyes: :thinking: :crazy_face:

I have tried to replicate this. I tried the script and followed MarkHunte but it doesn't work for me.
I tried both local and on a server.

The idea we have is that a number of people can add the status of a zoom call. Full, Empty etc. on the google doc and this will update the text next to the corresponding room button. So people don't have to blindly try rooms in vain.

I have a question... Can I specify which cell to show?

Hope you can help...

1 Like

Marks example still works as is ... so you might do something wrong.

Most probably :slight_smile:

Here is what I have done. I would appreciate any help.

Here is the google doc.

I have published it to web.

This is my version of your code.

The textbox id the other id is "room"

image

And here is the "on load"

image

I exported the hype to html5 and put it on a server. Nothing works...

If I get it to work how would I chose other cells in the java?

Any ideas?

Can you share the Hype document?

Sorry not as it stands, my client would not want that. But I can try to fix a simple freestanding test to try the code on it's own. I will fix very soon.

google link test.zip (9.5 KB)

You're just missing jQuery:

<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>

Add that to the 'head' of the document.

google link test.zip (12.3 KB)

O.M.G. :smiley:

THANK YOU!

It works. But...

If I make a change how do I get it to update automatically on the site?

And if I want a second value on row 03 room "PROD 01 ROOM 02" how do I do that in the java? Can I specify a specific cell?

There is a limit to how many posts I can add!!! :frowning:
So I have added to this one.

I have kind of solved my problems.
I use a mouseover (on the room button) to trigger the javascript so it updated just before you click to enter.
As for the google sheet it's just a matter of lots of columns. :slight_smile:
But a script to trigger the script every 5 seconds would be good, but I have not found out how yet. As you noticed I'm not a coder...

Stay tuned. I might have something yummy in the pipeline for this topic.

2 Likes

I assume you were referring to:

1 Like