Howdy, Stranger!

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

In this Discussion

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.

Object Record auto-numbering using SERIAL on all record types not working as expected

edited March 11 in Troubleshooting

Hello,
I have created an object record numbering configuration that works as expected except we would like it to number sequentially based on the last record regardless of the record type:

ACC-000001
ART-000002
FRN-000003

Instead, it numbers as below:
ACC-000001
ART-000001
FRN-000001

Is the first option possible and if yes what do I need to change in the below?
Thanks,
Matt

     formats = {

            ca_objects = {
                accessory = {
                    separator = -,
                    elements = {
                                code = {
                                        type = CONSTANT,
                                        value = ACC,
                                        width = 3,
                                        description = Object Type,
                                        editable = 0,   
                                        },
                                num = {
                                        type = SERIAL,
                                        width = 6,
                                        description = Serial Number,
                                        editable = 0,
                                        zeropad_to_length = 6,
                                        table = ca_objects,
                                        field = idno,
                                        sort_field = idno_sort
                                        }   
                                }
                        }

                accessory_set = {
                                    separator = -,
                                    elements = {
                                        code = {
                                                type = PARENT,
                                                width = 9,
                                                description = Object Set,
                                                editable = 0,   
                                                },
                                        sub_number = {
                                                type = SERIAL,
                                                width = 3,
                                                description = Set Object Number,
                                                editable = 0,
                                                zeropad_to_length = 3,
                                                table = ca_objects,
                                                field = idno,
                                                sort_field = idno_sort,
                                                child_only = 1
                                                }   
                                            }
                                    }

                    art = {
                        separator = -,
                    sort_order = [num, code], 
                        elements = {
                                    code = {
                                            type = CONSTANT,
                                            value = ART,
                                            width = 3,
                                            description = Object Type,
                                            editable = 0,   
                                            },
                                    num = {
                                            type = SERIAL,
                                            width = 6,
                                            description = Serial Number,
                                            editable = 1,
                                            zeropad_to_length = 6,
                                            table = ca_objects,
                                            field = idno,
                                            sort_field = idno_sort
                                            }   

                                    }
                            }

                        art_set = {
                                            separator = -,
                                            elements = {
                                                code = {
                                                        type = PARENT,
                                                        width = 9,
                                                        description = Object Set,
                                                        editable = 0,   
                                                        },
                                                sub_number = {
                                                        type = SERIAL,
                                                        width = 3,
                                                        description = Set Object Number,
                                                        editable = 0,
                                                        zeropad_to_length = 3,
                                                        table = ca_objects,
                                                        field = idno,
                                                        sort_field = idno_sort,
                                                        child_only = 1
                                                        }   
                                                    }
                                            }                   

                        furniture = {
                            separator = -,
                        sort_order = [num, code, sub_number], 
                            elements = {
                                        code = {
                                                type = CONSTANT,
                                                value = FRN,
                                                width = 3,
                                                description = Object Type,
                                                editable = 0,   
                                                },
                                        num = {
                                                type = SERIAL,
                                                width = 6,
                                                description = Serial Number,
                                                editable = 1,
                                                zeropad_to_length = 6,
                                                table = ca_objects,
                                                field = idno,
                                                sort_field = idno_sort
                                                }   
                                        }
                                }
                    furniture_set = {
                                        separator = -,
                                        elements = {
                                            code = {
                                                    type = PARENT,
                                                    width = 9,
                                                    description = Object Set,
                                                    editable = 0,   
                                                    },
                                            sub_number = {
                                                    type = SERIAL,
                                                    width = 3,
                                                    description = Set Object Number,
                                                    editable = 0,
                                                    zeropad_to_length = 3,
                                                    table = ca_objects,
                                                    field = idno,
                                                    sort_field = idno_sort,
                                                    child_only = 1
                                                    }   
                                                }
                                        }   

                        }

Comments

Sign In or Register to comment.