Can you explain in a little bit more detail what youāre trying to accomplish?
There is absolutely an easy way to do this, but I just need to understand the process so that I can understand what youāre doing in order to provide you with the proper solution.
So my first database contains lots of data points about multiple people. The data weāre interested in in this example is their NAME and their ID NUMBER.
The second database will be updated by the appās user and contains anonymised data about those people, showing their ID NUMBER, and not their name.
My aim is to display in the app the data from the second database, but also reference the first database and add the personās name to the screen.
For example:
Database 1
Name: Test Person
ID: 12345
Database 2
ID: 12345
Score: 100%
The app needs to recognise that ID NUMBER 12345 corresponds to āTest Personā and display:
Name: Test Person (from database 1)
ID: 12345 (from database 2)
Score: 100% (from database 2)
I hope this helps!
Note: The reason this is two databases is that the reports are generated by a third party, so have to be anonymised for data protection. This is not the case once the data is added to the app, as it is to be an internal system.
When you say ādatabaseā are you referring to collections or actual databases? Like, do you mean that the first collection in the database is the āUsersā collection and the 2nd collection in the database is the āReportsā collection? Or is the 2nd ādatabaseā an external collection?
If they are both internal collections, you can simply add a custom filter on the list of āDatabase 2ā where āReport > ID is equal to Logged in user > IDā
If the 2nd one is an external collection, youāll need to look at the API reference for your external database to see how to filter by ID.
My apologies, they are database collections, both internal to the app as I couldnāt find a simple way to integrate the external spreadsheets
The āReport > ID is equal to Logged in user > IDā isnāt referencing the Logged in user, unfortunately. Itās a team of people, only the managers have access to the data. It would need to be something along the lines of Report > ID is equal to Users > ID.
I canāt see how to make that connection though, Iām struggling to grapple with the relationships as they donāt seem to behave how I expect sometimes
The solution:
After re-reading the initial thread (Iāve been reading a ton of them today, had to refresh my memory), I see that you want to use the transporter ID to filter the data. You can certainly do that instead and you wouldnāt necessarily need the relationship. Iād still recommend going with the relationship that I mentioned.
Grab ALL of the components within your list and āmake a listā so that you have a list nested within a list.
Set this āList 2ā to Drivers > All Drivers with a custom filter where Transporter ID is equal to Current Scorecard > Transporter ID and set the maximum number of items to 1.
Also, by doing it this way, when you link to another screen with one of the components, you send both the current scorecard and the current driver data to the next screen. For example: