Implemented Access data from other pages

Noc

New member
Thanks for creating this web version of Scoreboard Assistant! It looks like it could be very useful and I am starting to set it up similar to my local version of Scoreboard Assistant.

A couple questions I have so far:
  • Although docData can access data from the current page, is there a way it could access data from another page? For instance, I would like to show commentator names on both Versus and Commentators scenes while only having to add fields for and update commentator names on a Commentators page.
  • It seems I cannot upload more than 20 images at once to a subdirectory of my Image library. Could that number be increased?
 

Jaxel

Administrator
Although docData can access data from the current page, is there a way it could access data from another page? For instance, I would like to show commentator names on both Versus and Commentators scenes while only having to add fields for and update commentator names on a Commentators page.
On your versus page, you want to access the contents of your commentators page, correct? Well you CAN do this! On every page, the reference to your package's DB is actually passed in a variable called packageDb.

On your versus page custom JS, you can access the docData of your commentators page with:
Code:
packageDb.collection('UNIQUE_ID_OF_COMMENTATORS_PAGE').doc('fields').onSnapshot(function(docRef2)
{
    if (docRef2.exists)
    {
        docData2 = docRef2.data();
        console.log("Retrieving data: ", docData2);
        // you can now access the data of the commentators page through the variable docData2
    }
});
Just remember to change UNIQUE_ID_OF_COMMENTATORS_PAGE to the 10 character unique ID of that page.

It seems I cannot upload more than 20 images at once to a subdirectory of my Image library. Could that number be increased?
I have increased the upload limit.