How to set a field to a given value when a record is duplicated

How to set a field to a given value when a record is duplicated

Hi.

I have a form in my application which has a field called Status. Status can be "Draft" [Edited - original post said "New", which was wrong], "In Progress" or "Closed".
When an existing record is duplicated via the Edit/Duplicate function in the list view, I want all the data to be copied to the new record, except the Status field which I always want set to "Draft" [Edited - original post said "New", which was wrong].

I have achieved this using the script input.Status = "Draft"; under Form Actions / On Success.

However, I don't want this script to execute when the user adds a new record manually, e.g. I don't want the user creating a new record with Status = "In Progress" and the 'on success' script then overwriting the status to "Draft" [Edited - original post said "New", which was wrong]). I only want Status set to "Draft" [Edited - original post said "New", which was wrong] when the record is created via the Duplicate function.





Is there a way this can be done?

Thanks!