When you want the user to select a record that is unrelated to the main object record, use tc:filter in the header section to define a filter page where the user will make this selection. To create the filter page for an unrelated object, use the tag attributes described in the tc:filter Tag Attributes table as well as those described in the following table.
Filter Tag Attributes - Creating Filter Pages for Non-Related Objects
Tag attribute |
Possible attribute value |
Description |
entity |
"EntityName" |
Type the name of the object from which you want the user to select a record. The user will be able to select from all available records, regardless of whether or not they are related to the main object record. For example, using entity="Account" allows the user to select any available Account. If the entity is a custom object, you must type entity="Project" and use the criteria tag attribute to identify the unique code of the custom object. For example: criteria="objectDefinition='SDTX'". |
criteria |
Use any of the following components in the criteria attribute value: •category='DefaultCategoryName' (the name of the default category of the records you want available in the filter page) •objectDefinition='ProjectUniqueCode' (if the non-related object is a project, use this component to provide the unique code of the project whose records you want available in the filter page) •name='RecordName' (the name of the record you want available in the filter page) •numberstring='RecordNumber' (the number of the record you want available in the filter page) |
When using the entity tag attribute, you can specify criteria for which object records will be available to the user to select using the criteria tag attribute. This prevents all records in the system from being made available in the drop-down list in the filter page. You can use any combination of the four components. For each component, you include the value that is desired in order for that record to be available to the user in the filter page. When using the criteria tag components, you must use the following conventions: •Component values are enclosed by single quotes. •Type a comma between components when using more than one. •Do not type any spaces between items or between commas in this tag attribute. •Enclose all components within a set of double quotes, as collectively they are a single attribute value. For example: criteria="category='AutoDriver',objectDefinition='VEHI'" |
Header |
<tc:filter name="SelectAccount" entity="Account" criteria="category='Office Reserve'" hidden="no" label="Please select an Account" displayString="Name;Number" displayFormat="* - *" /> |
Content |
<tc:filter select="SelectAccount"> <tc:data select="Name" /> <tc:data select="DefaultCategory/Name" /> </tc:filter> |
In this example, all Account records from the database that have the default category Office Reserve are listed in the filter page, so that the user generating the document can select an account. In the content section, the name and default category of the account that the user selected are retrieved and included in the generated document.