Edit WebSubmit Function

Main Menu

Enter Function Details:

Get_Recid Function Details:
   
Function Name: Get_Recid
Function Description:
Function Documentation:
Given the report number of a record (the global "rn"), retrieve the
"recid" (001).
The function first of all checks for the existence of the file "SN" in
the current submission's working directory. If it exists, it is read in
and used as the "recid".
Otherwise, this function will contact the database in order to obtain the
recid of a record. In this case, a check will be done in order to assure
that the recid can be handled by this submission.

Parameters: record_search_pattern - this enforces restrictions on which type
of documents can be modified via a certain submission interface. If the
record_search_pattern is not defined, no restriction will be enforced.
The record_search_pattern can be anything that can be used by
search_pattern to search for. Also, one can use variables stored locally,
like <comboDEMOJRN> to denote the category or subcategory.
Ex:
    reportnumber:DEMO-<comboDEMOJRN>-*
    collection:ATLANTISTIMESNEWS
    reportnumber:DEMO-<comboDEMOJRN>-* | collection:ATLANTISTIMESNEWS
As a note, you can test your pattern, using the search engine
and see if it retrieves the expected results.

WARNING: this check is not applied if a SN file already exists in
curdir.

Unless file curdir/SN exists, the function depends upon the global
value 'rn' having been set (for eg. by calling Get_Report_Number'
prior to this function) It will use this value when searching for
a record. Note: If 'rn' is empty, the search for the document will
not be conducted.

Exceptions raised:
    + InvenioWebSubmitFunctionError:
                      - if unable to open curdir/SN for reading;
                      - if unable to open curdir/SN for writing;
    + InvenioWebSubmitFunctionStop:
                      - if the global 'rn' is empty (no rn to search with);
                      - if no recid found for 'rn' value;
                      - if multiple recids found for 'rn' value;
                      - if recid should not be handled by the current submission;
 

Parameters for Function Get_Recid:

Parameter  
None

Add Parameter to Function Get_Recid:
Add Parameter: Select a parameter to add to function:    -Or-  Enter a new parameter: