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.

Failing trying to import new boxes into the Storage Location Hierarchy

edited March 2019 in Troubleshooting

I know this is basic stuff, but I have not been able to figure it out. I have most of my Storage Location Hierarchy in place in my CA instance. It was not the complicated, so we we built it manually. All I want to do now is import some new storage locations and place then as children under the correct shelves in the hierarchy. My import data has all of the box info AND the idno of the parent. I can import them and create new boxes, but they always end up under the root node, not under the desired parent. I can't seem to figure out how to use the refineries to connect then under the parent. I've tried several things involving splitters, but believe I should be using the storageLocationHierarchyBuilder. Attached is my datafile and the most recent mapping I tried. I'd appreciate any hints. Thank you.


  • Try this as your refinery parameter for storageLocationHierarchyBuilder:

    "parents": [{
    "idno": "^9",
    "name": "^10",
    "type": "box"

  • edited March 2019

    I did try this and it came tantalizingly close. It imported and created new boxes under a shelf with the correct idno, rather than using the existing shelf with the idno, it created a new shelf under the root in the overall hierarchy using the same idno and placed new child box under it. Both shelves now show a warning that the idno is in use two times. And the new shelf under the root has the type "box" just like we told it to have, I guess. Attached is the mapping and data again. Additional advice?

    Also, is there a posted guide to the structure and syntax of the refineries? I've looked at the documentation on refineries on the website, but it does not really give rules, it just shows examples. For example, the parameter parents in some examples has two sub-parameters, with a syntax something like
    "parents": [{xxxxx},{yyyyy}].
    In some examples it appears that xxxxx is the parent and yyyyy is the child. In others it seems reversed, and they don't quit match my situation because the examples are about creating new parents and children at the same time.

  • I'm sorry I'm not sure I'm understanding fully. Are you saying you'd like to match an existing record in the hierarchy rather than create new hierarchical records? If "box" is not the correct type you can update your mapping to the appropriate type within the refinery parameters. The refineries use JSON. If you'd like to check your work you can use a validator just as JSONLint.

  • I'm sorry if I was not clear.

    In my storage location hierarchy are buildings, rooms, units, shelves and boxes. Records for all except boxes already exist in CA, each already with a unique idno, for example, Shelf A on Unit 21 has the idno=21_a. I want to add box records to the hierarchy by importing my existing box information which is in the Excel box list. All of the the new records will have the same type, "box," and in the import data XLSX file there are columns for name, idno, metadata about the box, and the idno of its parent shelf.

    During the import I want CA to create a record for the box and place it under the current parent shelf in the hierarchy. I can successfully import and create the boxes with the desired metadata. However, I cannot figure out how to tell the CA to make each box a child of existing shelf for which I have the idno. I do not need to create parent records at import. I want each imported record to be a child of a record that already exists in CA.

    Since each line of the import file contains the idno of the existing parent, I was hoping it would be as simple as mapping the parent idno to some CA element at import, such as "ca_storage_locations.parent". However, my understanding is that because ca_storage_locations is a hierarchical table, I must use a builder during import to tell CA where to add the new box records into the existing hierarchy of records.

    Thank you for your attempts to assist me and your patience.


  • Wait!
    I just tried the simple solution and it worked!
    I don't need any kind of refinery.
    I just need to map the parent idno
    into ca_storage_locations.parent_id
    at import and the new box appears under the correct parent.

    I'm so sorry I bothered you with it.

Sign In or Register to comment.