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.

Why containers within a container in CDWA-Lite Description element

edited May 2018 in Troubleshooting
I'm working with CA 1.7.6 instance installed using CDWA-Lite profile.  It was quite close to what I needed, so I installed with that profile and am modifying it for my needs in the UI. 

The description metadata element in that profile is setup as a container with two sub-containers and a single text element within each sub-container.

description.description_line1.descriptiveNote and
description.description_line2.sourceDescriptiveNote

This seems unnecessarily complex. I'm wondering if anyone knows why it was made that way?  I keep thinking there must be a reason.  I'm tempted to simplify it to a one container with two text elements: description_text and description_source.  However, the description metadata element is used in almost every table and UI, so I wonder what I'm going to break making the change. 

This is not only element that I've run across that is a container, inside a container, with only a single text field inside it.  Can someone clue me in why one would do it that way?  Is it purely for display reasons?

Comments

  • edited May 2018
    This is an older profile, where containers-within-containers served as a clunky workaround to format the line breaks of sub-elements. This admittedly awkward solution is made obsolete by the "lineBreakAfterNumberOfElements" setting. Now you can just declare in the profile or UI where line breaks should begin. If all sub-elements should be stacked on top of each other, set to 1. If, say, the first 3 sub-elements should appear in a row, and the rest should be on lines below, set to 3.


  • I suspected this was some kind of older workaround for display.  Any idea how will it affect so many tables and UI's if I edit the element to remove the inner, unnecessary containers?
  • Do you already have data or are you still developing the profile? Restructuring the element itself will not affect the UI but it may potentially affect existing data within those containers.
  • No data yet.  Thanks!
  • I am wanting to check how to 'fix' the CDWA-Lite profile, and remove the no-longer necessary containers within containers. What I think can be done here is the outer containers ("description_line1" and "description_line2") can be removed, leaving just "descriptiveNote" and "sourceDescriptiveNote" as elements within the container "description". The lines with a strike through, are lines that I think can be removed. The new "lineBreakAfterNumberOfElements" has been added. (I have also increased the number of characters for the note.) Does this look correct?

    With thanks,
    Clifford.

    <metadataElement code="description" datatype="Container">
      <labels>
        <label locale="en_US">
          <name>Description/Descriptive Note</name>
          <description>A relatively brief essay-like text that describes the content and context of the work</description>
        </label>
      </labels>
      <settings/>
      <elements>
        ~~<metadataElement code="description_line1" datatype="Container">
          <labels><label locale="en_US"><name>Text</name></label></labels>
          <settings/>
          <elements>~~
            <metadataElement code="descriptiveNote" datatype="Text">
              <labels><label locale="en_US"><name>Text</name></label></labels>
              <settings>
                <setting name="fieldWidth">70</setting>
                <setting name="fieldHeight">5</setting>
                <setting name="minChars">0</setting>
                <setting name="maxChars">2040</setting>
                *<setting name="lineBreakAfterNumberOfElements">1</setting>*
              </settings>
            </metadataElement>
         ~~</elements>
        </metadataElement>
        <metadataElement code="description_line2" datatype="Container">
          <labels><label locale="en_US"><name>Source</name></label></labels>
          <settings/>
          <elements>~~
            <metadataElement code="sourceDescriptiveNote" datatype="Text">
              <labels><label locale="en_US"><name>Source</name></label></labels>
              <settings>
                <setting name="fieldWidth">70</setting>
                <setting name="fieldHeight">1</setting>
                <setting name="minChars">0</setting>
                <setting name="maxChars">255</setting>
                *<setting name="lineBreakAfterNumberOfElements">1</setting>*
              </settings>
            </metadataElement>
      ~~</elements>
        </metadataElement>~~
      </elements>
      <typeRestrictions>[...]</typeRestrictions>
    </metadataElement>
    
  • (Sorry, the markdown didn't do quite what I was wanting it to...)

  • I did fix it in all the instances it was used, which was quite a few, but I was not interested in coding profiles. I did it all in the UI after loading the profile.

  • "lineBreakAfterNumberOfElements" is a container-level setting so it should be placed within the first settings block, rather than within the settings of the sub-elements.

  • Ah, thank you Julia!
    (I am new to this, and it is a learning experience for me; so help is greatly appreciated...)

Sign In or Register to comment.