- 17 Jun 2024
- 4 minute read
- Print
- DarkLight
- PDF
Portals in Reader
- Updated 17 Jun 2024
- 4 minute read
- Print
- DarkLight
- PDF
Portals are primarily used to create custom sites that allow access to and interactions with Slate data, especially for constituents who may not have designated Slate user accounts. That said, portals functionality can also be extended to the Slate Reader.
Portals can be embedded inside of the Reader, allowing more dynamic pages to be accessible to readers (for example, dashboard pages). Conditional logic, tables, Liquid markup, and more can be leveraged to create an enhanced reader experience.
📝 NotePortals cannot be printed as a PDF. Administrative PDF downloads are recommended to print content like what may be featured on the Reader portal.
⭐ Best Practice:Reader portals are best used for displaying data, not for updating data. If your readers need to be able to update a record, Reader Review Forms should still be used for most of these cases.
Create the Portal
Click Database in the top navigation bar and select Portals.
Click New Portal.
Entering the following configurations in the edit details window:
Status: This can be left Inactive until ready for testing.
Folder: Select Reader, or create a new folder called 'Reader,' if necessary.
Key: Choose a simple key, such as 'dashboard.' This key must be unique across all portals and landing pages in your Slate database.
Name: Choose a descriptive name that will be easy to select later in the Reader setup.
Default View: This can be skipped until the desired View for the portal has been created.
Scope: User
Security: User
Click Save.
Configure the Dashboard
Queries
Configure queries using various bases to dynamically display data on the dashboard.
Click New Query.
Give the query a name such as "Applicant Data."
Select Applications as the Base.
Click Save.
Within the query, add export parts for the desired data points that will be displayed on the Reader dashboard. Edit each export part so that they have computer-friendly names: lowercase, no spaces. These new names can then be used as merge fields.
Add the record parameter (To display data specific to the applicant being read, a parameter will need to be added to the query, as well as a custom SQL filter).
Click Edit Parameters in the query and add the following snippet:
Parameters:<param id='record' type='uniqueidentifier' />
Remove the Portal Identity filter and add a new Custom SQL snippet. Remove the "Portal Identity" filter, if it is present. Then, add a new custom SQL filter from the filter palette, and enter the
Status: Active
Name: Current Application
Source Type: Custom SQL
SQL:
(a.[id] = @record)
When using a Configurable Joins base, you can avoid using a Custom SQL filter and compare the GUID for the Application to the @record parameter.
✨ Tip:Sometimes, you may wish to display multiples of items, such as all sports for which an applicant has been recruited, or a candidate's employment history, where you would not necessarily know exactly how many there are per applicant. You could use a different query base that would return one row per item, e.g. Sports, or Jobs.
When adding parameters to that query, you would need to also assign a node in order to correctly display these items in the page.
Additionally, the SQL snippet filter would need to be adjusted. For example, to display test scores using the Test Scores query base, the filter would look more like the following:
(t.[record] = (select [person] from [application] where ([id] = @record)))
Views
Create a view to customize the display of the page. It is possible to add merge fields or other blocks of static content, reports, and forms (form blocks will display in the Reader as links to the added form).
Click New View.
Set the Status to Active and give the view a Name (e.g. 'Default')
Layout: One Column is recommended.
Click Save.
Once a view has been created, it can be selected as a default view back in the edit details window for the portal.
Click and drag a new "Static Content" block from the content widget palette. Use the WYSIWYG editor to add text, tables, merge fields, Liquid markup, etc.
📝 NoteNow that the portal has been constructed, don't forget to update the main portal details to use the default view.
Methods
Click New Method.
In the edit details window, enter the following configurations:
Status - Active
Name - Provide a simple descriptive name, e.g.. "Get Applicant Data."
Type - GET
Action - Leave blank.
View - Select the desired view.
Output Type - "Framework + No Branding" is recommended. "Default Branding" refers to the Slate branding that is applied for external-facing pages hosted by Slate.
Click Save.
Click Edit Linked Queries.
Check the query that contains exports that are used as merge fields in the view.
Click Save.
📝 NoteNow that the portal has been constructed, don't forget to update the main portal details to use the default view.
Default View - Dashboard
Display the Dashboard in the Reader
Click Database in the top navigation bar and select Reader Tab Groups.
Click Insert.
In the insert record window, enter the following configurations:
Status: Active
Type: Link
URL Type: Portal
Portal: Select the portal saved in the Reader folder.
Record Parameter: Select Application Record. The record GUID will be passed into the parameter as defined in the portal query.
Name: The Name will display for the tab on the navigation panel within the Reader.
Order: Assign an order number by which the tab should display within the Reader.
Custom Reader Permission: Limit dashboard access based on a user permission, if desired.
Workflow: Select the default workflow, or custom workflows.
Base: Applications
Click Save.