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.

Including additional fields in an Object/location splitter

Hi,
I am importing object and location data into a profile based on the GRAM/UMMA profile. I have a location splitter that is working with the exception of capturing the storage type--which is a checkbox field in the profile. I have updated the list that supports the field to include additional types in my collection. Below is the splitter, what am I not seeing?

BB

{
  "relationshipType": "location",
  "storage_types": "rack",
  "parents": [{
  "idno": "^101",
  "name": "^101",
  "storage_types": "drawer"
  },{
  "idno": "^100",
  "name": "^100",
  "storage_types": "shelf"
  },{
  "idno": "^99",
  "name": "^99",
  "storage_types": "cabinet"
  },{
  "idno": "^98",
  "name": "^98",
  "storage_types": "flat_file"
  },{
  "idno": "^97",
  "name": "^97",
  "storage_types": "room"
  }, {
  "idno": "^96",
  "name": "^96",
  "storage_types": "department"
  }, {
  "idno": "^95",
  "name": "^95",
  "storage_types": "floor"
  }, {
  "idno": "^94",
  "name": "^94",
  "storage_types": "building"
  }]
 }

Comments

  • Is storage_types a metadata element, or is that where you are mapping the type_id of the storage locations?

    If it's a metadata element you need to wrap it in "attributes": {}

    If it's type_id it should be "type"
  • It is a metadata field. I have tried this but it does not work:

    {
    "relationshipType": "location",
    "attributes": {"storage_types": "rack"}
    "parents": [{
    "idno": "^101",
    "name": "^101",
    "attributes": {"storage_types": "drawer"}
    },{
    "idno": "^100",
    "name": "^100",
    "attributes": {"storage_types": "shelf"}
    },{
    "idno": "^99",
    "name": "^99",
    "attributes": {"storage_types": "cabinet"}
    },{
    "idno": "^98",
    "name": "^98",
    "attributes": {"storage_types": "flat_file"}
    },{
    "idno": "^97",
    "name": "^97",
    "attributes": {"storage_types": "room"}
    }, {
    "idno": "^96",
    "name": "^96",
    "attributes": {"storage_types": "department"}
    }, {
    "idno": "^95",
    "name": "^95",
    "attributes": {"storage_types": "floor"}
    }, {
    "idno": "^94",
    "name": "^94",
    "attributes": {"storage_types": "building"}
    }]
    }


    Any ideas?
  • Your JSON is invalid. Try using a validating tool. I like: http://jsonlint.com/
  • Thanks Julia--here is the final version that works as expected:

    {
    "relationshipType": "location",
    "storageLocationType": "rack",
    "attributes": {"storage_type": "rack"},
    "parents": [{
    "idno": "^101",
    "name": "^101",
    "type": "drawer",
    "attributes": {"storage_type": "drawer"}
    }, {
    "idno": "^100",
    "name": "^100",
    "type": "shelf",
    "attributes": {"storage_type": "shelf"}
    }, {
    "idno": "^99",
    "name": "^99",
    "type": "cabinet",
    "attributes": {"storage_type": "cabinet"}
    }, {
    "idno": "^98",
    "name": "^98",
    "type": "flat_file",
    "attributes": {"storage_type": "flat_file"}
    }, {
    "idno": "^97",
    "name": "^97",
    "type": "room",
    "attributes": {"storage_type": "room"}
    }, {
    "idno": "^96",
    "name": "^96",
    "type": "department",
    "attributes": {"storage_type": "department"}
    }, {
    "idno": "^95",
    "name": "^95",
    "type": "floor",
    "attributes": {"storage_type": "floor"}
    }, {
    "idno": "^94",
    "name": "^94",
    "type": "building",
    "attributes": {"storage_type": "building"}
    }]
    }

Sign In or Register to comment.