In the Info Template Properties window, users can create a new info template for the application.
- Name: This is a text field that allows users to input the name of the info template. It is a mandatory field.
- There are the following guidelines determining the validity of names:
- A valid name can contain letters, numbers, and the underscore symbol. It cannot, however, contain spaces or other special characters. It also cannot begin with a number.
- An info template must have a unique name. It cannot have the same name as another info template in the program.
- There are the following guidelines determining the validity of names:
- Title: This is a text field that allows users to input the title of the info template.
- Unlike with names, there are no guidelines determining the validity of titles.
- Active: This is a checkbox which, if selected, allows users to mark the info template out as active.
- Entity: This is a single-select dropdown field that retrieves the list of entities (from the Entity Designer section of the Entities module). It allows users to select the entity associated with the info template.
- Adding Code to Info Templates
Info templates are a key tool for injecting dynamic data into notifications. By understanding the standard code structure, users can craft contextually relevant info templates.
- Standard Code Structure
parameters.Add("[Name of Attribute]", domainObject.[Attribute] ?? "");
- Code Components
- ‘parameters’: This container stores the dynamic data intended for the notification.
- ‘Add(“[Name of Attribute]”, domainObject.[Attribute]’: This line incorporates the value of a specified attribute from a domain object into the parameters container.
- Users should modify this line to include the desired attribute name and its location within the domain object.
- ‘?? “ “’: This part ensures that if the attribute’s value is null or empty, it will be replaced with an empty string.
- Example: Adding a Title Attribute
parameters.Add("Title", domainObject.Title ?? "");
- Code Components
- ‘Title’: Denotes the specific attribute being retrieved.
- ‘domainObject.Title’: Points to the attribute within the domain object.
- Standard Code Structure