Dear Devin,

Devin Bougie wrote:

> We seem to be unable to delete an abstract using "Modify Record."  For 
> example, if you enter the "Modify Record" interface, select "Abstract," 
> delete all of the Abstract text (leaving it blank), and then click on "END," 
> nothing is changed.  If you change the abstract to a period ".", however, 
> that does work.

That is a limitation of WebSubmit/BibConvert:

When a field is left empty, WebSubmit simply does not create any 
corresponding file in the submission directory. As a consequence,
BibConvert will not include a line for this field in its output.
That happens for any field.

The simplest workaround I can think of right now is to include an 
additional line in the BibConvert template to consider the case of 
an emtpy field. For eg:

520::REPL(EOL,)::MINLW(82)---<datafield tag="520" ind1=" " ind2=" "><subfield 
code="b"><:ABSTRACT::ABSTRACT:></subfield></datafield>
520::REP(EOL,)::IFDEFP(ABSTRACT,,1)---<datafield tag="520" ind1=" " ind2=" 
"><subfield code="a"></subfield></datafield>

Here the second line generates an output only in the case where
ABSTRACT is empty (note that in that case, the first line does
not create any output).
This could maybe be done on one line, but I have not tested.

I once looked at the code of WebSubmit to see that empty fields have
been historically specifically removed by WebSubmit. Most probably to
not unnecessarily create empty MARC fields for values that have been
left empty by the submitters. This is a behavior I would be keen to
change, if I were sure that no existing submission is relying on this
behavior to work.  So your email is a good opportunity for me to ask
all users of CDS Invenio if some are relying on this "feature".
In any case I can think of several ways to deal with this:

1) A new function in BibConvert to specify that an empty field must
(or not) generate a line in the output. Eg:
520::REP(EOL,)::IFEMPTYDOANYWAY()
Note that it might be already possible to do this using one of the
already existing functions, by digging a bit more on the basis of the
above workaround! 

2) Add a checkbox next to each WebSubmit element to choose if an empty
value for this field should create an empty file in the submission
directory or not.

3) Have a CFG_ variable to configure the behavior site-wide.

4) Add a checkbox next to each action (Submit, Modify, etc.) of a
submission to configure the behavior of empty fields for this
action. After all, we might want to consider empty values at Modify
steps, but not Submit ones.

What do other people think?

Best regards
-- 
Jerome Caffaro ** CERN Document Server ** <http://cds.cern.ch/>

Reply via email to