Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

Multipart id numbering with sequence_by_type not working

I'm having trouble to make the "sequence_by_type" in Multipart id numbering works, or maybe I do not understood it clearly...

What I'm trying to do is add an automatic sequence number to the created objects. In the docs, it's stated that setting sequence_by_type to 1 (any non-zero value), the sequence numbers would be calculated by each type.

When creating, lets say, an "document" object, it gets the id sequence "SOMETHING.0000001" ;
Then,when creating an "file" object, it gets the id sequence "SOMETHING/00002".

Since they are different object types, I believe the file should receive the id sequence "SOMETHING/00001", right? Or it's is not the intended use for this?

Here is the multipart_id_numbering.conf block:

formats = {
    ca_objects = {

    ...

        file = {
            separator = .,          
            elements = {
                accession_parent = {
                    type = PARENT,
                    description = _(Accession parent)
                },
                object_number = {
                    type = SERIAL, 
                    width = 5, 
                    description = _(Object number), 
                    editable = 0,
                    sequence_by_type = 1,
                    zeropad_to_length = 5,
                    table = ca_objects,
                    field = idno,
                    sort_field = idno_sort,
                    child_only = 1,
                    editable = 1
                }
            }
        },
        documents = {
            separator = /,          
            elements = {
                accession_parent = {
                    type = PARENT,
                    description = _(Accession parent)
                },
                object_number = {
                    type = SERIAL, 
                    width = 7, 
                    description = _(Object number), 
                    editable = 0,
                    sequence_by_type = 1,
                    zeropad_to_length = 7,
                    table = ca_objects,
                    field = idno,
                    sort_field = idno_sort,
                    child_only = 1,
                    editable = 1
                }
            }
        },
    },

    ...

}

We are using Providence version 1.7.6 (also tested in another installation with 1.7.3)

Comments

  • edited October 2018

    I have mine working, I think you can't have the elements named the same. I have object_numberI for images and object_numberMV for moving images.

  • Oh, thank you @sarahs
    You are correct, changing the name of each element resolved the issue!

Sign In or Register to comment.