Calem Blogs

Blogs of CalemEAM

How to Configure Default Object Values in Calem

 Default object values are provided in the system files of Calem.

  • Table definition in metadata (Calem_Home/server/metadata/table)
  • Client configuration file (Calem_Home/client/conf/CmConf.custom.js)
  • The default values are shown in screens when creating new objects.

1. Default by Data Design

In the coming release R2019c (September 2019) admin can define default values for dropdown and lookup fields. Both standard and custom fields are supported. The following key objects are enabled with default values out of the box. Additional objects can be enabled - contact your Calem Support Team.

  • Asset & Location (cm_asset, cm_location)
  • Item & Inventory (cm_in, cm_in_sitee)
  • Work Order (cm_wo)
  • PM ('cm_pm, cm_pm_plan)
  • Service Request (cm_sr)
  • Change (cm_moc)
  • Requisition & PO (cm_req, cm_po)

The menu to configure default values is : Admin module | Data Design | Custom Default. The form has three tabs:

  • Custom Tab: to add/edit/remove default values
  • Configuration Tab: shows default values in the client configuration file.
  • System Tab: shows default values out of the box

Click "+" to add a default value and follow the screen flows to select an object to add default. Next, select a dropdown or lookup field of the object. Additionally, you may edit or delete a default value in the custom default list.

Finally, pick a default value from the value list to complete the configuration of a default value. 

The default values configured above will be used in Calem when creating a new object in the web or mobile client. For instance, the account code of 3500 is set in the creation screen when creating an asset. 

2. Defaults by Configuration

Default values can be achieved through from user interface through configuration.

  • Add configuration to CmConf.custom.js with default values. Both standard and custom fields are supported.
//Default for standard fields; e.g., stock_type_id
CmMetadata['cm_in']['fields']['stock_type_id']['default']='ist_stock';

//Default for custom fields; e.g., is_base
CmMetadataCustom['zc_cm_location']['fields']['is_base']['default']=1; 
  • The fields with default values must be present in the object creation screen. This can be done through form customization. See this blog
How to Exclude Documents in Work Order Print
How to Calculate Inventory Valuation Change

By accepting you will be accessing a service provided by a third-party external to https://eam.calemeam.com/