Automatically create a new Collector upon CE creation

The title purposefully mimics Automatically create a new Preparation, Determination, or Collection Object Attribute upon CO creation and says it all.

The Embedded Collecting Event option and the three remote preferences CO_CREATE_COA, CO_CREATE_DET & CO_CREATE_PREP proved very useful for easing up and securing new CO entry. Number of clicks is decreased and mandatory fields are clearly identified.

A Collecting Event does not make sense without a Collector in CAY herbarium. When I set up the CO_CREATE preps, my colleagues immediately asked whether a new Collector could be automatically created as well, since it is mandatory in our data entry process.

:point_up: Can one automatically creates a new Collector upon CE creation ?

A quick look at CollectionObject initialization and CollectionObject Resources initialization seems to indicate that presently answer is no and that it may not be straightforward to implement.

:thinking: I’m also wondering why you decided to implement COA, DET & PRE creation through Remote Preferences ? (genuine question) Have you thought of a generalized approach in viewdef resources, with for instance and XML attribute that would control the underlying resource creation ?

<!-- COA subview with 'create' attribute -->
<cell type="subview" viewname="CollectionObjectAttribute" id="10" name="collectionobjectattribute" colspan="14" initialize="" create="onDataEntry"/>
<!-- Collector subview with 'create' attribute -->
<cell type="subview" viewname="Collector" id="12" name="collectors" colspan="12" rows="3" create="onDataEntry" />

The create attribute could accept several values:

  • never (default)
  • onDataEntry : create the underlying object on new data entry only
  • ifEmpty : create the underlying object on new data entry or on data edition if empty
  • ?

Feel free to split the last bit to a separate thread “Generalizing automatic object creation on Data Entry” if the thought interferes with my 1st question on collector creation.

Hi @pverley,

Thank you so much for your message and for your valuable feedback on the automatic creation of a new Collector upon CE creation. I’ve added a GitHub feature request for this:

We appreciate your suggestion!

I agree that a generalized approach would be best, and I’ll pass that along to our development team as well!

1 Like