# Setting randomIdentifier for objects created prior to enabled randomId

**URL:** https://community.appfarm.io/t/setting-randomidentifier-for-objects-created-prior-to-enabled-randomid/633
**Category:** Ask the community
**Tags:** app-data, data-model, random-identifier, data-export
**Created:** [August 17, 2023, 9:40pm UTC](https://community.appfarm.io/t/setting-randomidentifier-for-objects-created-prior-to-enabled-randomid/633 "2023-08-17T21:40:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Kaspar](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kaspar/32/3073_2.png) [@Kaspar](https://community.appfarm.io/u/Kaspar)
#### Post date: [August 17, 2023, 9:40pm UTC](https://community.appfarm.io/t/setting-randomidentifier-for-objects-created-prior-to-enabled-randomid/633/1 "2023-08-17T21:40:32Z")

</div>

Hi,  
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](https://docs.appfarm.io/reference/global-data-model/graphql/mutations#generate-random-identifiers) 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?

---

<div class="post-metadata">

### Author: ![Joanna](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/joanna/32/122_2.png) [@Joanna](https://community.appfarm.io/u/Joanna)
#### Post date: [August 18, 2023, 8:25am UTC](https://community.appfarm.io/t/setting-randomidentifier-for-objects-created-prior-to-enabled-randomid/633/2 "2023-08-18T08:25:01Z")

</div>

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 😊

---

<div class="post-metadata">

### Author: ![Kaspar](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kaspar/32/3073_2.png) [@Kaspar](https://community.appfarm.io/u/Kaspar)
#### Post date: [August 18, 2023, 8:33am UTC](https://community.appfarm.io/t/setting-randomidentifier-for-objects-created-prior-to-enabled-randomid/633/3 "2023-08-18T08:33:00Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Joanna](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/joanna/32/122_2.png) [@Joanna](https://community.appfarm.io/u/Joanna)
#### Post date: [August 21, 2023, 1:28pm UTC](https://community.appfarm.io/t/setting-randomidentifier-for-objects-created-prior-to-enabled-randomid/633/4 "2023-08-21T13:28:57Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Kaspar](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kaspar/32/3073_2.png) [@Kaspar](https://community.appfarm.io/u/Kaspar)
#### Post date: [August 21, 2023, 2:20pm UTC](https://community.appfarm.io/t/setting-randomidentifier-for-objects-created-prior-to-enabled-randomid/633/5 "2023-08-21T14:20:29Z")

</div>

Thank you @Joanna  
It’s not a urgeent issue so we’ll wait for the release 🙂

---

<div class="post-metadata">

### Author: ![Joanna](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/joanna/32/122_2.png) [@Joanna](https://community.appfarm.io/u/Joanna)
#### Post date: [August 21, 2023, 4:29pm UTC](https://community.appfarm.io/t/setting-randomidentifier-for-objects-created-prior-to-enabled-randomid/633/6 "2023-08-21T16:29:09Z")

</div>

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 😊
