====== 自定义属性 ====== Each object type in Feng Office has its set of properties (attributes or fields) predefined by the developers. These attributes cover the most common data you might want to store with your object. But sometimes you have specific needs - this is where custom properties come handy. Custom properties are [[search|searchable]] like standard properties, but due to a bug in earlier versions this works only with Feng Office 1.5.1 (or newer).((See http://forums.opengoo.org/index.php?topic=2366.0)) ===== Custom property types ===== There are actually two types of custom properties. We refer to them as //specific custom properties// and //generic custom properties//. The latter exist since the early versions of Feng Office, while the more flexible and powerful specific custom properties have been introduced no earlier than Feng Office 1.4. {{:custom_properties.png|}} In the screenshot above, ''Company type'' is a specific custom property. As you can see it looks like any other property; the main difference to standard properties lays in the fact that it has not been programmed by a developer but configured by an administrator. Under the specific custom property you can see two fields called ''Name'' and ''Value''. This is a generic custom property, and it needs no configuration by an administrator. Every user can use this type of custom properties to store any information they like; depending on your perspective this freedom can be an advantage or disadvantage. ===== Specific custom properties (Feng Office 1.4 and above) ===== ==== Advantages of specific custom properties ==== Specific custom properties will guide users when entering data, because they make clear what data is expected, and because they can restrict the data entered. This supports the user and improves the data quality. If you take the screenshot above, every user will understand that he is expected to define the company type, that he has to make a choice between the existing values, and that he can select one, several or even none of these values. As an administrator you should consider to define specific custom properties whenever there are properties that are common to a number of records in your database. If you use Feng Office to store your business partners and clients, it's probably a good idea to define the tax number as a custom property for companies because you will need it quite often. On the other hand you probably won't define a custom property for opening hours just because you have one or two restaurants in your database - here a generic custom property will do the job. ==== Defining specific custom properties ==== To define specific custom properties, go to the [[administration panel]] an click //Custom Properties//: {{:admin_panel_custom_properties.png|}} You then have to choose the object type you want to define a custom property for: {{:custom_properties_object_type.png|}} You will realize that nearly every object in Feng Office can have specific custom properties. You can even have custom properties for [[users_vs._contacts|users]] and [[workspaces]]. The only exception from the rule are timeslots (see [[time|time module]]). Specific custom properties look the same for all object types. The following example relates to companies, but you will have identical options for any other object type. {{:administration_custom_properties.png|}} After clicking ''Add a custom property'' you get a form like in the screenshot above which offers the following options: * **Name:** The name of the custom property is shown as a label attached to the input field. {{:custom_properties_input_type.png|}} * **Type:** Defines the data to be stored plus the input field to be displayed: * ''Text'' - standard input field that accepts any text * ''Numeric'' - standard input field that accepts numbers only (including decimal values) * ''Boolean'' - checkbox (yes/no) * ''List'' - dropdown menu or multiselect list (depending on the option ''Multiple values'') * ''Date'' - input field for a date with date picker * ''Memo'' - text area * **Values:** Lets you enter the available values for a list. * **Description:** A short text that helps the user understand what the property is meant for. Is displayed next to the label (''Name''). * **Default value:** Defines the initial content of the input field. (If you set ''Required'' below it doesn't make much sense to define a default value.) * **Required:** If set the user must fill in this field (otherwise he can not save the record to the database). * **Multiple values:** If set the user can enter more than one value. Not available for custom properties of the ''Boolean'' type. * **Visible by default:** If set the custom property is immediately visible when you open the edit view (otherwise you have to click on ''Custom properties'' first to fold out this section). Specific custom properties will be displayed in the order you define. To change the order, simply use the arrow buttons on the right: {{:custom_properties_sort_order.png|}} ===== Generic custom properties ===== {{:generic_custom_properties.png|}} Generic custom properties consist of name/value pairs. Their use is quite obvious, so there's not much to say about it. Since Feng Office 1.2 you can have an unlimited number of generic custom properties.((See http://forums.opengoo.org/index.php?topic=739.0)) To add a new name/value pair, simply click ''Add a custom property''. To remove a name/value pair, use the delete button on the right. ===== Displaying and editing custom property values ===== Data in custom property fields is accessible in the detail view and the edit view, but not in the list view. As described above, you have the option to define for each specific custom property whether or not it should be instantly visible when you open the edit view. As an exception to the rule custom properties of workspaces are shown in the [[dashboard]] as well: {{:custom_properties_dashboard.png|}}