Multi-tenant Audiences
This module was designed for technically savvy administrators only. Both the Enabled and Custom options are complicated to configure, could involve custom code, and will affect the performance of the web site.
- Hard coded audience filters in data sources or custom code will not consider this tenants unless they utilize a SystemFilter script or method. They only apply to audiences as they are used to filter and secure front-end content.
- A record in a standard module containing no selections in tenant custom attributes will always be accessible and returned by the system filter. In other words, NO selections behaves like ALL selections. This behavior is by design because most standard modules will not contain these custom attributes and should return records as if ALL tenants were selected.
- If a tenant user/audience property has no selections the modules will only display records with no selections when the custom attribute exits. This allows for backward compatibility without displaying records that are tagged to specific tenants.
- The Start Date, End Date, Taxonomy, Audiences, Roles, and Display Status attributes in the Tenants modules (A, B, or Generic) are not used for tenant filtration. They are only used when these modules are used to create a user interface via the module designer. Audiences and Display Status are also used for console functionality. It is recommended that this is noted using header text in custom attributes or by hiding these attributes when the tenants module has no user interface.
- Adding Tenant custom attributes to tenants modules is not recommended although it could be utilized in some highly specific and custom scenarios.
- Custom Attributes: Each tenant attribute must be added to all modules that require tenant filtration using custom attributes. These attributes may be single- or multi-select. Examples for TenantsA/B attributes can be downloaded here, but similar attributes can be added for any standard module when Custom is selected. When using generic modules it is impossible with to select no records and have it behave as if nothing was selected because the selection of no records behaves as if all records were selected. To work around this you must create a NONE record in the generic module and the filter must be developed to support this record by DataId. You could also add a required field validator to ensure that at least one selection is made preventing the selection of ALL records. When a NONE record is added it should be filtered out of the custom user or audience properties and prevented from deletion with module configuration. This has been implemented by default in the Tenants A/B modules and attributes.
- DataId Attributes: Each tenant attribute must be added to the DataId Attributes module configuration. The tenant filtration will not work if they are not added here. This allows the system to generate an efficient filter. Existing records in this module will not be automatically updated by this change. You can either resubmit existing records manually, or run Development > Utilities > Update DataId Attributes to apply this change to all records at once.
- User/Audience Properties: The Members > Contact > Tenants A and Audiences > Company > Tenants B properties can be extended or modified using Admin > Properties > User/Audience Properties. To hide TenantsA/B you can upload custom properties setting isVisible="false".
Custom (Requires Custom Development)
- Begin by configuring the module or modules you wish to become your tenants. You may use Tenants A/B and/or any number of generic modules. These modules will become Custom Attributes and User/Audience Properties in other modules as described below.
- Add a custom property relating the tenants module(s) to Members or Audiences using Admin > Properties User/Audience Properties. By default Tenants A exists in Members and Tenants B exists in Audiences. Custom filtration could support both properties in Users, both in Audiences, and/or additional similar properties in Users or Audiences. They may also be single- or multi-select.
- Override the system filter and security methods with custom code referencing your custom tenant attribute(s). These methods must be developed specifically for these attributes, their selection modes, and the site workflow. A starter file can be downloaded here, copied to Root/App_Code/Custom/Tenants.cs, and modified accordingly.
- The system will generate simple tenant filtration/security which allows all of the tenant selections in the current user/audience property. A Custom workflow may be required if you wish to display a single tenant at a time. The filtration could be configured to always return a single record, and a custom selector script could be developed to allow a user to select different values within their available values in the attribute. The filter could be based upon a session variable or query string variable that defaults to one of the users/audiences values and the selector allows users to change that value.
Additional Resources
Form Field Types Reference
Centralpoint Forms support 13 different field types. Here's a quick reference for the most commonly used types:
| Field Type |
Purpose |
Key Parameter |
| FormTextBox |
Single-line or multi-line text |
TextMode='MultiLine', Rows='4' |
| ExtDatePicker |
Date picker with calendar |
sourceFieldId (requires 3 components) |
| FormListBox |
Dropdown selection |
AddListItems (XML format) |
| FormUpload |
File upload control |
defaultValue stores file path |
| FormSignature |
Digital signature capture |
Width, Height (auto-creates 4 metadata fields) |
| FormEditor |
Rich text WYSIWYG editor |
Width='980' |
Key Point: All form fields require a group attribute that must be identical across all form components (HTML, Field Map XML, email templates). Mismatched group names cause silent failures.
DataSource Best Practices
DataSources consist of four components that must work together correctly:
| Component |
Purpose |
| SQL SELECT |
Retrieves data from database |
| Template Content |
Wrapper HTML, runs once at beginning |
| Item Content |
Repeating template for each record |
| Styles (CSS) |
Visual styling (prefer embedding in Template) |
Critical Rules
Rule 1: The Placeholder Requirement
Template Content MUST include: ItemContent
Without this exact placeholder, rows will NOT render even if SQL returns data.
Rule 2: Attributes vs Standard Fields
Standard fields: name='FieldName'
Attribute fields: name='cpsys_Attributes:FieldName'
They will NOT render if called incorrectly.