--- title: "Portal Data Tables" slug: "portal-tables" updated: 2025-04-01T21:50:08Z published: 2025-04-01T21:50:08Z canonical: "knowledge.technolutions.net/portal-tables" --- > ## Documentation Index > Fetch the complete documentation index at: https://knowledge.technolutions.net/llms.txt > Use this file to discover all available pages before exploring further. # Portal Data Tables **Data tables** in portals let users intuitively interact with data you pull from a query. [](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/1h6p3xvbbkcnrpu7lmxjpqmceclip0__14_.png?sv=2026-02-06&spr=https&st=2026-10-15T20%3A16%3A22Z&se=2026-10-15T21%3A16%3A22Z&sr=c&sp=r&sig=9xwyWBXTwZVDw2sN8A3FFzIVHnFvOzzReGZ6hyOUPGE%3D) ## Before you begin This article covers two methods of creating tables in portals: the **table widget** and **liquid looping.** - **Option 1: Table widget:** More straightforward and user-friendly, but limited to one table per view - **Option 2: Liquid looping:** Provides additional options for more advanced users, including multiple tables per view Regardless of the method you use, you must create a **query** to return data. #### One-to-many data Data tables in portals usually display data with a **one-to-many** relationship. For example, a single applicant likely has multiple test scores to be displayed on their status portal, or one alumni volunteer might be assigned multiple interviewees. **📖 Further reading:** [The one-to-many relationship](/v1/docs/joins) #### Portal-building prerequisites Before you try to add data tables to a portal, you should be familiar with the following prerequisite materials: - [Creating a Custom Portal](/v1/docs/creating-a-custom-portal) - [Liquid Markup Looping](/v1/docs/liquid-markup-looping) - Basic HTML, particularly the `table`, `tr`, and `td` tags ## **Creating the portal query** First, we need to create a query: > [!NOTE] > 1. Go to **Database → Portals.** > 2. Select an existing portal, or [create a new one](/v1/docs/creating-a-custom-portal). > 3. Create a new query in your portal. > 4. Select **Edit Parameters.** > 5. In the **Output Node** field, enter a name for the node. > > [](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/blobid0__2_.png?sv=2026-02-06&spr=https&st=2026-10-15T20%3A16%3A22Z&se=2026-10-15T21%3A16%3A22Z&sr=c&sp=r&sig=9xwyWBXTwZVDw2sN8A3FFzIVHnFvOzzReGZ6hyOUPGE%3D) > 6. Select **Save.** In this example, the query returns a list of prospects. The results set from the query is then placed into the node `person_list`. **📖 Further reading:** [Output nodes](/docs/creating-a-custom-portal#output-nodes) > [!TIP] > **✨ Tip:** Include a sort to set the order in which the results should appear. ## Option 1: Table widget In a portal **view**, select a **Table View widget** from the palette. The widget contains four areas of configuration: - **General settings:** For configuring the table view - **Page Display:** To determine how the widget should render in the portal view - **Table Layout:** For formatting table contents - **Filters:** To filter the results returned by the query > [!WARNING] > 📝 **Note:** Views can only include one table widget; use [Liquid Looping](/v1/docs/portal-tables#liquid-looping-method) if you need to display multiple tables in a view. #### General settings Configure the following settings: - **Name:** Give the table a name - **Status:** Active - **CSS Class Name:** See [Additional customization with CSS classes](/v1/docs/portal-tables#additional-customization-via-css-classes) - **Query:** Select the query you created earlier to populate the table results. Only portal queries with an output node appear in the list. - **Items per page:** Enter a number to limit the table’s pagination to that many rows. If left blank, defaults to 50. - **Generate Code:** Selecting **Generate Template** adds the table, as well as the basics of the Liquid markup and looping. These can be edited after generation. [](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/blobid3.png?sv=2026-02-06&spr=https&st=2026-10-15T20%3A16%3A22Z&se=2026-10-15T21%3A16%3A22Z&sr=c&sp=r&sig=9xwyWBXTwZVDw2sN8A3FFzIVHnFvOzzReGZ6hyOUPGE%3D) #### Page display When you select **Generate Template,** the Page Display field is populated with: - Header text (a centered `h2`) - Liquid markup that displays the table if the size of the node is greater than 0, and a generic error message if not (that is, if no results are returned). [](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/blobid4.png?sv=2026-02-06&spr=https&st=2026-10-15T20%3A16%3A22Z&se=2026-10-15T21%3A16%3A22Z&sr=c&sp=r&sig=9xwyWBXTwZVDw2sN8A3FFzIVHnFvOzzReGZ6hyOUPGE%3D) Select **Source.** In the source code, you’ll notice that JavaScript has been generated automatically that renders the table on the portal view: [](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/blobid5.png?sv=2026-02-06&spr=https&st=2026-10-15T20%3A16%3A22Z&se=2026-10-15T21%3A16%3A22Z&sr=c&sp=r&sig=9xwyWBXTwZVDw2sN8A3FFzIVHnFvOzzReGZ6hyOUPGE%3D) #### Table layout Moving on to **Table Layout**, you’ll find a table is generated that uses the names of the exports in the query as column headers. Table Layout also shows the Liquid markup generated that conditionally displays the *Prev* and *Next* links based on your specified number of results. The conditional aspect comes into play when there are no additional results before or after the current page. [](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/blobid6.png?sv=2026-02-06&spr=https&st=2026-10-15T20%3A16%3A22Z&se=2026-10-15T21%3A16%3A22Z&sr=c&sp=r&sig=9xwyWBXTwZVDw2sN8A3FFzIVHnFvOzzReGZ6hyOUPGE%3D) Here, you can also see the Liquid looping syntax by selecting **Source**. - The table includes all exports from the portal query. - The merge fields reflect the order of the exports in the query. - The columns can be edited or removed as desired. [](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/blobid7.png?sv=2026-02-06&spr=https&st=2026-10-15T20%3A16%3A22Z&se=2026-10-15T21%3A16%3A22Z&sr=c&sp=r&sig=9xwyWBXTwZVDw2sN8A3FFzIVHnFvOzzReGZ6hyOUPGE%3D) The end result in this example: [](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/1h6p3xvbbkcnrpu7lmxjpqmceclip0__14_.png?sv=2026-02-06&spr=https&st=2026-10-15T20%3A16%3A22Z&se=2026-10-15T21%3A16%3A22Z&sr=c&sp=r&sig=9xwyWBXTwZVDw2sN8A3FFzIVHnFvOzzReGZ6hyOUPGE%3D) ### Editing the table If, after testing, you wish to make any changes to the table, or if additional exports were added to the query and you would like those new exports included in the table, the table template can be reset by editing the table and clicking "Reset Template." Alternatively, the table can also be directly edited in the Table Layout to add the new exports. [](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/blobid9.png?sv=2026-02-06&spr=https&st=2026-10-15T20%3A16%3A22Z&se=2026-10-15T21%3A16%3A22Z&sr=c&sp=r&sig=9xwyWBXTwZVDw2sN8A3FFzIVHnFvOzzReGZ6hyOUPGE%3D) ### **Adding pop-ups** **Portal pop-up** functionality displays additional information about a particular row in the results list. 📖 **Further reading:** [Portal pop-ups](/v1/docs/portal-pop-ups) When using the table view widget, a link to a pop-up is automatically generated within the table if the query used contains the exports of `id` and `name`. - Specifically, both `id` and `name` are referenced in the same table cell, and the link is associated with a portal pop-up method that has an Action of `details`. - When the table is rendered on a portal page, each table row can then display a pop-up when the user selects anywhere on that row. - If the method in the portal has a different *Action*, the source code can be edited to match the desired method. [](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/blobid8.png?sv=2026-02-06&spr=https&st=2026-10-15T20%3A16%3A22Z&se=2026-10-15T21%3A16%3A22Z&sr=c&sp=r&sig=9xwyWBXTwZVDw2sN8A3FFzIVHnFvOzzReGZ6hyOUPGE%3D) ```xml
| Person Name | Person Major | Person Decision |
|---|---|---|
| {{item.name}} | {{item.major}} | {{item.decision}} |