Use dataslot value to lookup document and field from Firebasae

Admittedly new to React and this development in general -

I’m trying to use a value from a picker on the next screen to display the fields from that document in my Firestore. I’ve finally figured out how to send the value of the picker to the next screen using a dataslot, and I can display that value on the next page. I’m using the document key from my Firebase data.

Now, I want to select elements of the document to display on the page (logo, title, etc.). I’ve setup a component to be the header that has the layout of the logo and other elements, but I’m not understanding how to use the dataslot value of the document key to retrieve the associated values.

Does this have to be done in a custom script or is it something I can accomplish in the UI?

EDIT - I do have a datasheet that is supposed to be quering based on the document_key that is being stored in the dataslot using this in the “Collection Id” field:
schools/$slot(‘ds_activeSchool’)
I’ve also set a default value for the dataslot using one of the existing document_key values.
I am able to get the document_key value to display on the page referencing the dataslot value but not when trying to referneced the filtered datasheet.

So it appears that the filtered datasheet is not coming through to this page?

Hi and welcome to the forum!

You should use Data sheet (then one with query or direct path to document) as data source for the “Details screen”. Here is a good video example: https://www.youtube.com/watch?v=Y2xQ7ouqz0o