Frequently Asked Questions

How do I create custom amenities with quantities?

An amenity is something that exists for a specific site, building, floor, room or asset. For example, a room might have a "Projection Screen" and a "Whiteboard". These are called amenity types.

An amenity group is a set of related amenity types, and there may be any number of groups. For example, the above amenity types might be in a "Teaching Aids" group.

The amenity types of a specific amenity group may optionally have a quantity, as a whole number. For example, the number of whiteboards in a room.

SISfm and Archibus are supplied with test data including one room amenity group named "amenity", without quantities.

Here we describe how to add a room amenity group named "Sanitary Items" with amenity types "WC", "Hand Basin" and "Hand Drier", with quantities.

For the database steps, use the SISfm Database Manager module for standalone SISfm, otherwise use equivalent functions in Archibus.

  1. CREATE DATABASE TABLES FOR THE AMENITY GROUP
    1. Refer to the amenity tables documentation.
    2. Inspect tables rm_amenity and rm_amenity_type in your database, to obtain the schema attributes of their fields.
    3. Create corresponding tables rm_sanitary and rm_sanitary_type in your database, including the quantity field.
  2. POPULATE AMENITY TYPES
    1. Add rows to table rm_sanitary_type as the available amenity types, e.g:
      #rm_sanitary_type.sanitary_type
      WC
      Hand Basin
      Hand Drier
      
  3. ADD FEATURE FIELD SETTING FOR THE AMENITY GROUP
    1. Refer to the feature field settings documentation about amenities.
    2. Use the config.aspx page to add a setting for the amenity group to the room feature fields, in this case e.g:
      Feature
      *sanitary*, D, S, 1, Sanitary Items
      
    3. You can now visit a room details page and use Edit to test this amenities group.
    4. If you want amenity types to only be shown for rooms that have them, use config.aspx to check the FeatureBlankOmit setting.
  4. ADD FEATURE FIELD SETTINGS TO COUNT AMENITY TYPES
    1. Refer to the feature field settings documentation about field calculations.
    2. Use the config.aspx page to add a setting for the amenity group to the floor feature fields, in this case e.g:
      FloorFeature
      (SELECT SUM(rm_sanitary.quantity) FROM rm LEFT JOIN rm_sanitary ON rm.bl_id=rm_sanitary.bl_id AND rm.fl_id=rm_sanitary.fl_id AND rm.rm_id=rm_sanitary.rm_id WHERE rm_sanitary.sanitary_type='WC') AS total_wc, , , 1, Sanitary Items, Total WCs
      
  5. ADD AMENITIES REPORT TO REPORT MANAGER
    1. Create a database view for the report, e.g using the database/sql.aspx page:
      CREATE VIEW sisfm_report_sanitary AS
      SELECT bl.site_id
      ,bl.build_no
      ,rm.fl_id
      ,rm.rm_id
      ,(SELECT quantity FROM rm_sanitary s WHERE s.bl_id=rm.bl_id AND s.fl_id=rm.fl_id AND s.rm_id=rm.rm_id AND s.sanitary_type='Hand Basin') AS HandBasin
      ,(SELECT quantity FROM rm_sanitary s WHERE s.bl_id=rm.bl_id AND s.fl_id=rm.fl_id AND s.rm_id=rm.rm_id AND s.sanitary_type='Hand Drier') AS HandDrier
      ,(SELECT quantity FROM rm_sanitary s WHERE s.bl_id=rm.bl_id AND s.fl_id=rm.fl_id AND s.rm_id=rm.rm_id AND s.sanitary_type='WC') AS WC
      FROM rm
      LEFT JOIN bl ON rm.bl_id=bl.bl_id
      

      NOTES:

      1. Use of the SQL PIVOT keyword is a better way to do this.
      2. Adding database views in the SISfm Database Manager module is not yet supported.
    2. Create a report AVW file under your DataFolderReport folder, e.g:
      Avw.StartDef	""
      Avw.AddAssigned	"sisfm_report_sanitary", 0
      Avw.EndDef
      
      Avw.FldOn	"sisfm_report_sanitary.site_id"
      Avw.FldOn	"sisfm_report_sanitary.build_no"
      Avw.FldOn	"sisfm_report_sanitary.fl_id"
      Avw.FldOn	"sisfm_report_sanitary.rm_id"
      
      Avw.FldOn	"sisfm_report_sanitary.HandBasin"
      Avw.FldOn	"sisfm_report_sanitary.HandDrier"
      Avw.FldOn	"sisfm_report_sanitary.WC"
      
      Avw.AddRest	"sisfm_report_sanitary", "", "sisfm_report_sanitary.site_id", "=", ""
      Avw.AddRest	"sisfm_report_sanitary", "", "sisfm_report_sanitary.build_no", "=", ""
      Avw.AddRest	"sisfm_report_sanitary", "", "sisfm_report_sanitary.fl_id", "=", ""
      
      Avw.SetSort	"sisfm_report_sanitary", "sisfm_report_sanitary.build_no, sisfm_report_sanitary.fl_id, sisfm_report_sanitary.rm_id", FALSE
      
      Avw.AddBreak	"sisfm_report_sanitary.build_no", FALSE
      
      Avw.AddStat	"sisfm_report_sanitary.HandBasin", AVW_STAT_TOTAL
      Avw.AddStat	"sisfm_report_sanitary.HandDrier", AVW_STAT_TOTAL
      Avw.AddStat	"sisfm_report_sanitary.WC", AVW_STAT_TOTAL
      
      Avw.SetSys	"Report Title", "Sanitary Types Report"
      		

If you need further assistance, please contact IFM Support <support@integratedfm.com.au>.