93
Views
5
Comments
Solved
How to fetch data from collections of firebase in Reactive Web App?
Question
Application Type
Reactive

Hi, 

I want to fetch the key-value pairs from the Firebase database collection to my Oustystems Reactive Web App to display it on the screen and perform CRUD operations.

If I make any changes to the data on the web app, it should be reflected in the database.

I've attached the Firebase collection (userData) with one of its documents containing key-value pairs. Please help me configure the database and fetch this data from the Firebase database to my web app step-by-step. 

Currently, I have a blank app. 

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi,

Step 1: setup integration form OutSystems to the Firebase Firestore 

There is an OutSystems Forge component Firebase Firestore that will help you to quickly be able to access the data, that you can install in your environment: 
https://www.outsystems.com/forge/component-overview/7044/firebase-firestore

See the documentation tab on how to configure access.


The Forge component provides, for both Reactive and Mobile:

  • Block which can be used in screens to listen for real-time updates
  • Client Side APIs to
    • Add Document
    • Create or Update Document
    • Remove Document
  • Server Side API for
    • Create or Update Document
    • Get Document

Step 2: Create a screen and Fetch the data

  • Add a screen, and use the actions provided by the Forge component to fetch and display documents.

Step 3: Create actions to create or update data

  • Add functionallity to add or edit data
  • Use the actions provided by the Forge component to create or update documents.

Hope this plan helps achieve you to implement the requested functionality.

Regards,

Daniel

UserImage.jpg
Amna Nadeem

Thanks, I'm filling in these values in GetDocumentData Server Action but getting this message " Object Reference not set to an instance of an object".

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Maybe you can share your OML without additional information it is hard to understand why you get that error.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
UserImage.jpg
Amna Nadeem

Hi Daniel Kuhlmann's, I have the listed values of the service account but don't know where to use them in Service Studio, where to configure them?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.