User Tools

Site Tools


New Developers Working Group

The Fieldmapper

The fieldmapper (fm_IDL.xml) maps the fields! It defines objects’ fields, linked fields from other objects, and permissions needed to access various things. Most of the Evergreen code (including the reports engine) accesses the database content via the fieldmapper rather than accessing the database directly.

The fieldmapper is installed in two locations on your server:

  • /openils/conf/fm_IDL.xml
  • /openils/var/web/reports/fm_IDL.xml

To view the current fieldmapper on your own site through a browser:

  • https://[your domain].org/reports/fm_IDL.xml

Outline of fieldmapper classes:

Things to Add to This Page:

  • Information about the main fieldmapper classes
  • Example of how to navigate the fieldmapper
  • Relationship of the fieldmapper to reports
  • Relationship of the fieldmapper to the PostgreSQL database schemas

Parts of the Fieldmapper

class header


This is the shortened term to describe this set of information. If your class will be accessible to pcrud, this is the term you'll use to reference this class in other places in the code.


There are multiple values possible for this field. They include:

  • open-ils.cstore
  • open-ils.pcrud
  • open-ils.reporter-store




This essentially means that the class or field is not "real" in the actual database table, only in the context of the IDL. It is often used for links to other classes:

<field reporter:label="Hours of Operation" name="hours_of_operation"
 oils_persist:virtual="true" reporter:datatype="link"/>

It can also be used to indicate such things as a view that is defined by SQL in the IDL rather than in the database.



If set to true, this view will show up in the list of core report sources.

Only use this if the value is true. It should be written as



This will be the name of your view in list of available report sources in the reporter, so it should be in readable language.




field reporter:label



  • bool - true/false
  • text
  • int - a whole number
  • float - a decimal number
  • link - a reference to a different class.
  • id - a whole number. This class's links are other class's ids.
  • money - an amount of money
  • org_unit - a library/sublibrary etc.
  • interval - an amount of time shown as a number followed by a letter for the unit e.g. 20h for 20 hours or 7d for seven days
  • timestamp - an unchanging point in time


These distinctions are to indicate key directionality. They are not to indicate nullability.

  • has_a
  • has_many
  • might_have





If you specified open-ils.pcrud in the controller, you need to have a section for permacrud. If you did not specify open-ils.pcrud in the controller, do not include this section.

This section specifies whether users should have the ability to create, update, delete, or only retrieve data from this class and its associated table (if applicable).

permacrud xmlns

<permacrud xmlns="">

This should be the opening tag for your peramcrud area.


  • create - Must correspond to a permission
  • retrieve - Can be used alone without the other create/update/delete actions. Can be used without a specific permission, if appropriate for how the class is to be used
  • update - Must correspond to a permission
  • delete - Must correspond to a permission

If using the create/update/delete actions, the class must also be mapped to an oils_persist:tablename.

newdevs/db/fm.txt · Last modified: 2024/06/12 10:21 by smayo

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.