Ask AI
Skip to main content

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 True to make the column visible to users, or False to hide it. By default, this is set to True.

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
  • 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
  • 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 be True or False.)
  • 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.