Add the ability to use a value to reference a database in a trigger
It would be great if we could use values for the database reference in a trigger, instead of having to select a database from a drop-down.
An actual use case:
To be able to use Realm for our various staging areas, we have created multiple Realm apps. One for production, one for UAT, one for test, etc. Each of them pointing to the databases for their respective staging environment.
We are using Github deployments, and we use a separate branch for each of the staging environments. So when something gets committed to the "deploy-test" branch, it gets to be deployed to the test Realm app. Thanks for adding that feature by the way!
Now we face the following problem: The database reference is stored in the Github repository. We could work around this, by using values that are not included in the Github repository, but 'manually' added to the Realm app. These values can then be used in the Realm app, and the values can be different per staging environment. This works great for functions, but the problem is that this can't be used for triggers.
So for now, we're replacing placeholder-values with an actual database name in the staging deployment branches using a script, which is error-prone, and we actually need to do a force-push to make it a bit workable in an automated way. Not something that we're loving at the moment.
So basically we just one simple thing to have everything work super smooth! So please add the ability to use a value for a database reference in a trigger.