CMS API : Generating unique values based on sheme for attribute when creating new type instance

Is there a way for generating unique values for an attribute when creating a new type instance ,

for example : Type Definition : Contract

Attribute : contract_id

and the values will be : CONT-LOA-0011 ?

Answers