Set visibility of a column
Function: Set visibility of a column
This action allows you to control whether a specific column within a data table on your application's screen is shown or hidden. It's useful for customizing the information displayed to users based on their needs, roles, or specific conditions.
Input
- Datatable (PART): The specific data table component on your page where you want to change a column's visibility. You will select this directly from your application's interface.
- Column (STRING): The unique identifier or name of the column you want to show or hide within the selected data table.
- Visible? (BOOLEAN): Choose
Trueto make the column visible to users, orFalseto hide it. By default, this is set toTrue.
Output
This action directly modifies the display of the data table on your application's page and does not produce any specific output value.
Execution Flow
Real-Life Examples
Here are some practical ways you can use the "Set visibility of a column" action:
Example 1: Hiding sensitive information for general users
- Scenario: You have a "Customer Details" table that contains sensitive information like "Credit Card Number" which should only be visible to specific administrators.
- Inputs:
- Datatable:
Customer Details Table - Column:
Credit Card Number - Visible?:
False
- Datatable:
- Result: The "Credit Card Number" column in the "Customer Details Table" will be hidden from all users, ensuring sensitive data is not accidentally displayed.
Example 2: Showing optional details based on user interaction
- Scenario: On a "Product Catalog" page, users can click a "Show Advanced Details" button to reveal additional product specifications.
- Inputs:
- Datatable:
Product Catalog Table - Column:
Technical Specifications - Visible?:
True
- Datatable:
- Result: When the "Show Advanced Details" button is clicked, the "Technical Specifications" column in the "Product Catalog Table" will become visible, providing more information to the user.
Example 3: Toggling column visibility based on a user's role
- Scenario: In an "Employee Performance" dashboard, only managers should see the "Salary Information" column.
- Inputs:
- Datatable:
Employee Performance Table - Column:
Salary Information - Visible?:
[Variable: CurrentUser.IsManager](This assumes you have a variable that checks if the current logged-in user is a manager, which would beTrueorFalse.)
- Datatable:
- Result: The "Salary Information" column in the "Employee Performance Table" will automatically be visible if the current user is a manager, and hidden if they are not.