Properties
SmartObject properties are the attributes that define the object, like columns in a spreadsheet or fields in a database table. They store items that define a record, like First Name, Last Name, Social Security Number, Department and so on. You can manually create properties or you can use a service to retrieve properties from external data sources through to a SmartObject, and use those line of business (LOB) properties directly in workflows, forms, views, and reports.
The type of SmartObject you design determines the service that your SmartObject is based on:
- SmartBox SmartObject: A SmartObject containing properties and predefined methods based on the K2 SmartBox service (local storage in the K2 database).
- Advanced SmartObject: Allows you to create a SmartObject from one or more services, including SmartBox, and to customize the methods.
The following property types are available when you create a SmartObject property:
Type | What it is |
---|---|
AutoGUID | Similar to Autonumber, AutoGUID is an identity type where a GUID is auto-generated when a record is created |
Autonumber | When a new record is created in the SmartObject, an index number is automatically generated |
Date | Allows you to set a property to display data in a date format |
Date Time | Allows you to set a property to display data in a date and time format |
Decimal | Allows you to enter decimal numbers in the SmartObject property |
File | Stores a file of supported types |
GUID | Global Unique Identifier |
Hyperlink | Stores the property data as a hyperlink |
Image | Stores an image of supported types |
Memo | Large String |
Multivalue | Use multivalue data types to store multiple values in one SmartObject property. When you use service objects that have multivalue properties, such as the Active Directory service object, the values are translated to the XML schema provided below . If the format cannot be translated, the data type is not stored. An example of the expected schema is: <collection> <object> <fields> <field> <value>2</value> </field> <field> <value>4</value> </field> <field> <value>6</value> </field> </fields> </object> </collection> The multivalue data type is typically used with a Check Box List control in views. This reads and updates the values from the multivalue property. The values shown in the Check Box List can be either static values or SmartObject list results. |
Number | Allows you to input numerical values |
Text | Stores ANSI standard text characters |
Time | Allows you to set a property to display the data in a time format. |
Yes/No | Boolean type property |
Use the information below to determine where and when to use the following data types:
- DateTime - Allows you to specify a Coordinated Universal Time (UTC) that shows the time in the local timezone.
- DateTime (with timezone) - Allows you to use a UTC time that does not vary based on the local timezone.
- Date - You can use this for a timezone-invariant date (no time).
- Time - You can use this for a timezone-invariant time (no date).
You can configure settings that further define the SmartObject properties. The types of settings depend on the property type you edit. This means that not all settings are available on all property types. Follow the steps below to configure the property settings.
Some of the additional property settings such as Maximum Size, Time Precision, and Constant Size only apply to SmartBox SmartObjects. Other line of business systems might not support the property settings as described in the table below. When a SmartObject is a SmartBox object, several property settings may only be changed when there is no data in the SmartBox SmartObject. If there is data you may be blocked when trying to save the changes. If that is the case, you must export data from the SmartObject, delete that data, update the SmartObject, and then import the data again.
- From the K2 Designer, select the SmartObject and click Edit.
- Select the property and click Edit.
- The Edit Property page shows.
- Click OK to save changes made to the properties.
The following table describes the available property settings:
When you work with Advanced SmartObjects, make sure to check the SmartBox check box to enable the additional settings.
Property types or better known as data types are automatically validated upon executing the CREATE or SAVE method on a SmartObject. For example, if you try to CREATE a new record for a SmartObject property called Mobile with a data type of type [Number], but with a value that is of type [Text], a server side message displays stating that validation has failed.