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.

Display formatting: use of ifdef and units - combine of units and case

edited February 6 in Troubleshooting

I'm trying to make displays and I'm facing
different problems:

Just to give an Idea, the whole Publication unit
should ideally be structured like this:
 

<unit>
TITLE
<unit>
<case>

AUTHOR
</case>
</unit>
<unit>
<case>
PUBLISHER
</case>
</unit>
<unit>
ISSUE
</unit>
DATE
IDENTIFIER
</unit>

image
  1. can't seem to
    get rid of my comma's when cells don't have a value. This is only when I work
    with units. 
    I tried two
    different formats and both give the same (unsatisfying) result (related
    specifically to the presentation of the <unit> 'Issue':

                       <unit
relativeTo="ca_objects.publication_issue">

<ifdef
code="ca_objects.publication_issue.issue_title">
^ca_objects.publication_issue.issue_title, </ifdef>

<ifdef
code="ca_objects.publication_issue.author"> ^ca_objects.publication_issue.author,
</ifdef>

<ifdef
code="ca_objects.publication_issue.issue_volume"> Vol.
^ca_objects.publication_issue.issue_volume, </ifdef>

<ifdef
code="ca_objects.publication_issue.issue_number"> No:
^ca_objects.publication_issue.issue_number, </ifdef>

<ifdef
code="ca_objects.publication_issue.issue_month">
^ca_objects.publication_issue.issue_month
<br/></ifdef></unit>

                         <unit
relativeTo="ca_objects.publication_issue">

<ifdef
code="ca_objects.publication_issue.issue_title"> ^ca_objects.publication_issue.issue_title</ifdef>

<ifdef
code="ca_objects.publication_issue.issue_title">, </ifdef>

<ifdef
code="ca_objects.publication_issue.author">
^ca_objects.publication_issue.author</ifdef>

<ifdef
code="ca_objects.publication_issue.author">, </ifdef>

<ifdef
code="ca_objects.publication_issue.issue_volume"> Vol.
^ca_objects.publication_issue.issue_volume</ifdef>

<ifdef
code="ca_objects.publication_issue.issue_volume">, </ifdef>

<ifdef
code="ca_objects.publication_issue.issue_number"> No: ^ca_objects.publication_issue.issue_number</ifdef>

<ifdef
code="ca_objects.publication_issue.issue_number">, </ifdef>

<ifdef
code="ca_objects.publication_issue.issue_month">
^ca_objects.publication_issue.issue_month</ifdef>

<br/></ifdef></unit>


2. can’t seem to
get rid of spaces when I work with units that contain different entities and
restrictions.

<unit
relativeTo="ca_entities" delimiter=", "  restrictToRelationshipTypes="author">

<ifdef
code="ca_entities.preferred_labels">^ca_entities.preferred_labels</ifdef>

</ifdef></unit><br/>

<unit
relativeTo="ca_entities" delimiter=", "  restrictToRelationshipTypes="publisher">

<ifdef
code="ca_entities.preferred_labels">^ca_entities.preferred_labels</ifdef>

</ifdef></unit><br/>

3.    
I have
repeating or always present text when I try to differentiate ‘Authors’ and ‘Publicists’.

image

<unit
relativeTo="ca_entities" delimiter=", "  restrictToRelationshipTypes="author">

<ifdef
code="ca_entities.preferred_labels">Author: ^ca_entities.preferred_labels</ifdef>

</ifdef></unit><br/>

<unit
relativeTo="ca_entities" delimiter=", "  restrictToRelationshipTypes="publisher">

<ifdef
code="ca_entities.preferred_labels">Publisher: ^ca_entities.preferred_labels</ifdef>

</ifdef></unit><br/>

 4.      
I tried to
solve this using <case> and combine it with <unit> but again I don’t
succeed in obtaining a satisfying result. I used two kinds of formatting, once
with <ifnotdef> and once with <ifcount>

 <unit relativeTo="ca_entities"
delimiter=", "  restrictToRelationshipTypes="author">

<case>

<ifdef
code="ca_entities.preferred_labels">Author: ^ca_entities.preferred_labels</ifdef>

<ifnotdef
code="ca_entities.preferred_labels"><Author: unknown</ifnotdef>

</case>

</unit><br/>

<unit
relativeTo="ca_entities" delimiter=", "  restrictToRelationshipTypes="publisher">

<case>

<ifdef
code="ca_entities.preferred_labels">Publisher: ^ca_entities.preferred_labels</ifdef>

<ifnotdef
code="ca_entities.preferred_labels">Publisher: unknown</ifnotdef>

</case>

</unit><br/>

 

<unit
relativeTo="ca_entities"
restrictToRelationshipTypes="author">

<case>

<ifcount
code="ca_entities.preferred_labels" max=”0”> Author: unknown </ifcount>

<ifcount
code="ca_entities.preferred_labels" max=”1”> Author: ^ca_entities.preferred_labels
</ifcount>

<ifcount
code="ca_entities.preferred_labels" min=”2”> Author: ^ca_entities.preferred_labels%
delimiter=", " </ifcount>

</case>

</ifdef></unit><br/>

<unit
relativeTo="ca_entities"
restrictToRelationshipTypes="publisher">

<case>

<ifcount
code="ca_entities.preferred_labels" max=”0”> Publisher: unknown </ifcount>

<ifcount
code="ca_entities.preferred_labels" max=”1”> Publisher: ^ca_entities.preferred_labels
</ifcount>

<ifcount
code="ca_entities.preferred_labels" min=”2”> Publisher: ^ca_entities.preferred_labels%
delimiter=", " </ifcount>

</case>

</ifdef></unit><br/>

 

I Tried a lot of versions and variations of these formats but I don't seem to get it right.
What am I missing? 

Thanks!
Annelies

 

534 x 211 - 9K
749 x 231 - 31K

Comments

  • Hi Annelies,

    You should be using <ifcount min="1" code="ca_entities" delimiter=", "><unit relativeTo="ca_entities">^ca_entities.preferred_labels</unit></ifcount> for your repeating entity fields.  See if this solves some of your spacing and punctuation issues.
  • Many thanks Sophie! I'll give it a try. :)
  • For some reason I'm still struggling. I've tried to solve it this way:


    <unit relativeTo="ca_objects.publication_objects">
    <ifdef code="ca_objects.preferred_labels"><b>^ca_objects.preferred_labels</b></ifdef>
    <unit relativeTo= "ca_collections.hierarchy_location" delimiter="  ➔ ">(^ca_collections.preferred_labels)<br/></unit>
    <case>
    <ifcount max="0" code="ca_entities"><unit relativeTo="ca_entities"restrictToRelationshipTypes="author">Author: unknown</unit></ifcount>
    <ifcount min="1" code="ca_entities" delimiter=", "><unit relativeTo="ca_entities"restrictToRelationshipTypes="author">^ca_entities.preferred_labels</unit></ifcount>
    </case><br/>
    <case>
    <ifcount max="0" code="ca_entities"><unit relativeTo="ca_entities"restrictToRelationshipTypes="publisher">Publisher: unknown</unit></ifcount>
    <ifcount min="1" code="ca_entities" delimiter=", "><unit relativeTo="ca_entities"restrictToRelationshipTypes="publisher">^ca_entities.preferred_labels</unit></ifcount>
    </case><br/>
    <unit relativeTo="ca_objects.publication_issue">
    <ifdef code="ca_objects.publication_issue.issue_title"> Issue: ^ca_objects.publication_issue.issue_title, </ifdef>
    <ifdef code="ca_objects.publication_issue.issue_volume"> Vol. ^ca_objects.publication_issue.issue_volume, </ifdef>
    <ifdef code="ca_objects.publication_issue.issue_number"> No: ^ca_objects.publication_issue.issue_number, </ifdef>
    <ifdef code="ca_objects.publication_issue.issue_month"> ^ca_objects.publication_issue.issue_month
    <br/></ifdef></unit>
    <ifdef code="ca_objects.date"> ^ca_objects.date</ifdef><br/>
    <ifdef code="ca_objects.idno">(^ca_objects.idno)<br/></ifdef>
    </unit>

    The display just keeps on getting stranger looking.

    image
    770 x 398 - 16K
  • Hi Annelies,

    <unit relativeTo="ca_objects.publication_objects"> will not work, it should be relativeTo="ca_objects"

    Also you are missing as space before each case of restrictToRelationshipTypes.

    I don't think the case brackets are needed and can be removed.
Sign In or Register to comment.