Sp7 Data Entry: Auto-insert current Catalogued Date

This question carries on what has already been discussed about auto-inserting catalogued date and catalog number in Sp7 Workbench (Sp7 WorkBench: Auto-insert Catalog Numbers, Sp7 WorkBench: Auto-insert Cataloged Date).

When I create new CO from Data Entry menu:

  • Cataloger is auto-filled with current logged-in user;
  • Catalog Number is formatted so that it will be auto-inserting when saving the Collection Object;
  • Cataloged Date is empty and is not filled when saving the Collection Object.

Question: does Sp7.5.0 allow to auto-insert current cataloged date in data entry forms ?

Cheers, Philippe V.

Hi @pverley,

Yes! This can be achieved by adding default="today" to the cell, like so:

<cell type="field" id="12" name="catalogedDate" uitype="text" uifieldformatter="Date" default="today"/>

There are other options available for the default. This is not exclusive to the catalogedDate field, and can be used for any field using a date format.

Relative

today + 2 days
today + 14 weeks
today + 1 month
today - 1 year
today + 3000 seconds

Absolute (format should follow what is in remote refs)

01/01/2022
2022-01-02
05/2022

This information is contained in Editing Forms in Specify 7, along with many other helpful explanations of forms in Specify 7. Hope this answers your question!

1 Like

Wonderful! Seems obvious that I should have been looking in Form edition now that you said so… :sweat_smile:

Just for the record, default="today" (and variations as suggested by @markp ) also works perfectly with PartialDateUI

<cell type="field" id="5" uitype="plugin" name="this" initialize="name=PartialDateUI;df=catalogedDate;tp=catalogedDatePrecision" default="today" uifieldformatter="Date" colspan="3"/>

Thanks! :partying_face:

1 Like