Hi
I’m currently developing a website for a school project. I have little coding experience, but I need to be able to have buttons to read data from a google spreadsheet.
As of now, my website features 6 groups with approximately 15 buttons each. It takes around 30 seconds for everything to show up on all the buttons. I was wondering if there were either a way to optimize the code below or to run the below await functions in parallel.
Here is an example of the code with only four buttons in one group:
async function getValuesFromSheet() {
try {
//Group 1
const [text1A,text2A,text3A,text4A] = (await getValuesWrapper('A1:D1'))[0];
const [link1A,link2A,linkA,link4A] = (await getValuesWrapper('A2:D2'))[0];
$w('#button1A').label = text1A;
$w('#button2A').label = text2A;
$w('#button3A').label = text3A;
$w('#button4A').label = text4A;
$w('#button1A').link = link1A;
$w('#button2A').link = link2A;
$w('#button3A').link = link3A;
$w('#button4A').link = link4A;
} finally {
}