I have made a project which requires me to search and see if the user input is equal to a value in my database. I’m aware of the similar posts here, however, the answers have different blocks which makes it difficult for me to follow and their data retrieval requirements are different from mine. Any insight would be deeply appreciated. Even the posts from December 2020 have different blocks to what I can find.
This is a simplified version of my actual project :
I want to take the input from text field and check if that User ID is present in the database. If it is present, I want to change the label that displays “Well…” to “Yes, it matches!”.
I also want to change the label “Does It Match?” to the Name associated with the ID in the database.
Please let me know if you need any other information. I have been trying to figure this out for so long but with no luck. If anyone could explain the concept behind the blocks too, that would be very helpful for me to retrieve the data in other ways as well.
When you go in the loop "for each “j” in …, “j” actually has what is under the key “UserID”. But you are using a single “key” just under the “UserID” key and therefore you should check this way
In the loop it should say [for each “j” in list [get object properties of] [cloud variable UserID]
@backscratcher2007 You should not need Realtime DB components and the cloud variable are not only direct but also works in a synchronous mode which eliminates a lot or uncertainty. You also have the listeners readily available for all variables which can monitor any outside changes to the database making it easy to implement multi use capabilities
using this block will allow you to know and interact with any change taking place in the database whether from the app or from other sources.
You need to go to project settings page and fill in the API key and Database URL exactly as you would do if you plan to use the components.
In the other hand, the DnD UI does not have the database component and you are left with the cloud variable to interact with Firebase. So better use them from now.