Custom Attributes¶
Custom attributes make it possible to extend an Entity, in order to add specific information supporting specific process needs in the customer solution. Once defined and published, Custom Attributes may be added to pages in IFS Cloud Web and IFS Cloud Mobile using the Page Designer.
Types of Custom Attributes¶
There are two main types of Custom Attributes.
- Persistent attributes are used to store extra information for an entity. These can be simply types like strings and numbers, enumerations, or a reference to another entity.
- Read Only attributes are used to look up related information (e.g. by following a reference) or to perform calculations on other attributes in the entity.
Performance Considerations¶
There is no specific upper limit on the number of fields that can be added to an entity.
Adding more attributes will not affect performance of the core business logic, but there will be a performance overhead when the custom attributes are added to / shown in pages, reports etc.
Generally speaking the overhead for persisted attributes is small, whereas for read only calculated attributes it can be larger depending on what exactly is calculated. So don't add more custom attributes than needed, and only add the ones really needed to be shown/edited on a page to that page.
Create a Custom Attribute¶
Steps to follow for all Custom Attributes
-
Go to the Entity Configuration page in Solution Manager > Configuration > Entity Configurations.
-
Select Configuration Entity for which you want to create a Custom Attribute. You can either create a new Entity or search for an existing Entity.
-
In the Custom Attributes section, add a new record to start the 'Add Custom Attribute' assistant to configure the custom attribute to your liking. For more details on different types, refer to Types of Custom Attributes.
-
By default only the main view for an Entity will be extended with the new custom attribute. In some cases the Entity may have multiple views used by different application pages. In these cases you have to approve the relevant detail views manually.
- In the header section, follow the link Approved Detail Views
- In the Approved Detail Views dialog, select in which additional views you want the custom attributes to appear.
-
Approve at least one of the attributes and the Entity.
-
Publish the Entity.
-
Optionally add Translations to your attributes.
Note: If you create a Standard Entity with Timezone awareness and subsequently create a Date/Time type custom attribute within it, the attribute will inherently possess timezone support.
Add Custom Attributes to Application Pages¶
After your custom attributes are published, they can be added to application pages.
- Go to the page where you want to show the attribute.
- Open the Page Designer and configure the page according to your preference.
Custom Attributes support in structure-based projection actions¶
Structures can be defined using entities with a default (nested) CRUD support. Unbound projection actions which are based on such structures support custom attributes. In order to have custom attribute support, these structures have to be annotated with config entity property. This functionality could be used especially to enrich integration APIs including IFS premium APIs.