Reset specific fields of a model on record duplication

:wave:, is there a way to reset specific fields on a model when a record get’s duplicated or a new locale is added to a existing record?

Hi @martin.palma, can you please explain what you mean by this?

What does “reset” mean? Blank them out?

If you’re doing this by API, you can just specify the new field value in your script, whether it’s a blank or anything else.

If you mean you want this to trigger on UI changes, I think you’ll have to make some custom webhooks that’ll either act on a new record of a certain type, or diff vs the previous version to see what’s changed (like a locale), and modify the fields accordingly.

Is that what you’re asking? If I misunderstood, could you please provide a more complete example so I can understand what you want to happen? If you can link to a specific project or provide sample code/screenshots, that’d help too. Thanks!

Yes sorry my bad, with “reset” I mean they should be blanked out (delete the previous record data).

A webhook in our case is not an option. Currently we do it with a plugin but that’s cumbersome. I hoped there would be a better way, for example when I create a model I could set an option on the field which always blankes out it’s content on a new record event or duplicate record event.

Sorry about that. Maybe this one could be a feature request as well?

Or if there’s any particular reason you can’t use a webhook but would like to, perhaps we can try to help with that?