For the complete documentation index, see llms.txt. This page is also available as Markdown.

Multi-select Relationship Column

A multi-select column allows users to select multiple values for a single record.

In powertable, you can create a multi-select column that retrieves values from a related table. This enables users to select one or more entries from another table in the database, helping maintain data consistency and reducing manual data entry.

Some common use cases for multi-select columns include:

  • Associating multiple categories or tags with a product or record.

  • Tracking multiple skills or certifications for an employee.

  • Linking multiple suppliers to a product or inventory item.

  • Assigning multiple team members to a project or task, and so on.

The following example demonstrates how to add a Sales Rep multi-select column to the Products table, allowing users to associate one or more sales representatives with each product.

To add a multi-select column, follow these steps:

  1. Select Insert Column > Visual Column > Add Multi-Select Relationship Column.

1

Alternatively, you can insert a new column from the 'Home' tab, as shown below:

2

Enter the column name

Let's add a 'Sales Rep' column that will allow users to assign multiple sales representatives to each product in the 'Products' table.

3

Select the sales representative table

The sales representative details are available in another table with the 'Sales Rep Key' field and other fields.

Sales Rep Table

Note that a separate relationship table must exist in the database with these three fields—Primary ID, Product Key, Sales Rep Key.

If you do not already have a relationship table, create one manually using PowerTable (using the ‘New Table’ option)

4

Enter the lookup table details

We would like to get the first names of sales representatives from the 'Sales Rep Table' and display the list in the dropdown.

Lookup table details

5

Set up the relation table

Enter the name of the relation table, the corresponding reference column to map the lookup key values in the relation table, and the identifier column details that match the primary keys of the current and relation tables.

Relation table details

This stores or updates the mapping between products and sales reps in the relationship table as we assign and unassign sales reps to the products in the app. Click Save.

6

Review the multi-select relationship column

We have now successfully added a multi-select relationship column, which allows you to select and assign multiple sales representatives to each product.

Multi-select relationship column

After assigning, you can click Save and Proceed to save your changes to the database.

Save changes

The relation table is also simultaneously updated based on the selected values.

Last updated

Was this helpful?