Context: Certain instruments may require a choice of configuration options in order to be setup properly for use by a booker. For example, an instrument could use lasers of different types and a lab technician would like to know which ones have been selected for that day. The booker should therefore be required to select from a drop down list of different choices. This could also be useful for other contexts such as choosing a layout for a meeting room or for specifying how many people will be attending a session.
Suitable for: Admins as it is requires access to the Bakery in order to setup the relevant properties.
Objective: We will be setting up a list of options for the different equipment configurations and then adding an additional property to the Booking biskit in order to make these choices available as a drop down box.
Steps:
- In your admin account click on Admin and then Bakery
- Click on Mapped Int in the menu on the left or expand it by clicking on the plus sign (useful to check whether a similar set of choices has been setup - different lists can be reused)
- With Mapped Int selected, click Create in the toolbar to the right
- Supply a name which is self explanatory, such as 'Laser Colours'
- A display group will place it into the menu on the left - you can create your own display groups to make organising your mapped ints easier
- Choose whether you want a Null Value Label - this is the label which will be stored if no other options are selected
- In The Values box underneath, click Add once for each value that will be required to create the Name/Value pairs required.
- Start adding the names which you will be using for the drop down box - for our first context this will be the laser colours which your users will select from
- Next to each name, make sure there is a unique integer value. Don't worry though, Calpendo will make sure that if you repeat an integer it will let you know with a red box!
- Click Save and then refresh your browser to make the Mapped Int available for the next series of steps
- Still in the Bakery select Biskit Def in the menu on the left
- Scroll down to the Booking Biskit and select it
- If you want this new drop down box to apply to all bookings for all resources you can edit the Booking Biskit directly to add the property for the mapped int.
- But if you would like this drop down box to appear on booking forms for specific resources you will need to create a booking subtype.
- In the Biskit editor window select Edit
- Click Add New under Properties
- Set the Type to 'Int'
- Provide a name such as 'lasers' for this context
- You can specify a different label such as 'Choose Laser Colour' for the booking form
- Set the Integer Type to 'Mapped Integer'
- Once you have selected mapped integer you will then be able to choose the Mapped Int you wish to use such as 'Laser Colours'
- You can then choose the default value which if left as 'Null' will use the null value label you specified when you setup the mapped int
- Save the Biskit editing window
- Before you do anything else select Update DB Schema in the main toolbar for the Bakery (Click Apply Changes when requested)
- Then select Reload DB Configuration and then refresh your browser
- Go and test your new booking form and your lasers will be ready