I just enabled randomIdentifier for some object classes that contained objects already. I need to generate the randomIds for all these objects but are struggeling to figuere out how.
I’ve read the documentation on generating random identifiers using mutations Mutations - Appfarm Documentation but using the suggested query (and changing it to reflect the object class) only resolves in the error:
Cannot query field "PopulateBuiltinPropertyProject" on type "RootMutationType".
Any ideas on how to get this to work, or if there is any other way of setting randomIdentifier for objects created prior to randomId being enabled?
Hi @Kaspar, I see I’ve been a bit too eager with updating the docs Sorry about that! Good news is that it’s coming in the next release
Ahaa, it’s a great teaser - looking forward to the release. In the meantime, what would be the best way to update these missing fields?
And a follow-up questions: The reason we enabled this is to be able to get a id of some sort when extracting/exporting data that needs to be transformed (e.g., in excel) and then loaded/imported back in. As the Id property of an object can’t be selected, we figured a randomId would be second best option - but why can’t the Id property be selected for export?
Hi @Kaspar! Unfortunately, there’s no easy workaround here, as you cannot modify values of built-in properties like random identifier, id, created date, etc.
You could create a custom property to handle this, and use JS to generate a random string. However, if it’s not an urgent issue, I’d recommend waiting until the next version of Create is released.
As for the ID in data export, we’ve registered a challenge to enable it.
Thank you @Joanna
It’s not a urgeent issue so we’ll wait for the release
Perfect. One more workaround that was suggested when we brainstormed this internally and I found pretty elegant is to create a runtime function property returning
_id, and using that in export. Just in case anyone else is looking for workarounds