Maintain Filter When Switching to Another View

I have two views , lets call it View A and View B. View A is a table view and has two ref column type multiple selections dropdown filters called dropdown 1 and dropdown 2.
I want when I filter in View A and switch to View B, View B is based on the filtered view of View A. View B is a chart view that is based on two separate columns from the same slice of View A.
How can I accomplish this, I will really appreciate response. 

Thank you

Solved Solved
0 2 554
  • UX
1 ACCEPTED SOLUTION

To achieve the functionality where View B (a Chart view) reflects the filtered data from View A (a Table view) based on two reference column type dropdowns, you will need to use a combination of Slices, User Settings, and Expressions in AppSheet. Hereโ€™s a step-by-step approach:

  1. Create User Settings for Filters:

    • Go to the 'Data' tab and select 'User Settings'.
    • Create two settings corresponding to your dropdown filters (Dropdown 1 and Dropdown 2). Ensure their types match the data you expect users to select (like Enum or EnumList).
  2. Use User Settings in a Slice:

    • Create a Slice of your original data table. This slice will be used for both View A and View B.
    • In the 'Row filter condition' of the Slice, use an expression that filters data based on the user settings. For example:
    • AND( [RefColumn1] = USERSETTINGS("Dropdown 1 Setting"), [RefColumn2] = USERSETTINGS("Dropdown 2 Setting") )
    • Adjust this expression to match your column names and user setting names. The expression can be more complex depending on whether you allow multiple selections or want to handle empty filters.
  3. Create or Modify View A:

    • Ensure View A is based on the Slice you created.
    • You can set up the dropdowns in the view to change the User Settings. This will require users to manually trigger a sync after changing the filter settings for the data to update.
  4. Create or Modify View B:

    • Set View B (Chart view) to also be based on the same Slice.
    • Configure the Chart view to use the columns you want to visualize. Since View B is using the same slice as View A, it will only show data that matches the current filter settings in the User Settings.
  5. Sync Behavior:

    • Users will need to sync the app after changing the filter settings in View A for the changes to reflect in View B. This is because User Settings changes require a sync to update the data shown in the views.
  6. Optional: Automatic Update:

    • If you want the views to update automatically without manual sync, you might need to explore more complex solutions like using AppSheet's automation features or dynamically updating a control table. However, this would typically require more advanced setup and might have limitations.

View solution in original post

2 REPLIES 2

To achieve the functionality where View B (a Chart view) reflects the filtered data from View A (a Table view) based on two reference column type dropdowns, you will need to use a combination of Slices, User Settings, and Expressions in AppSheet. Hereโ€™s a step-by-step approach:

  1. Create User Settings for Filters:

    • Go to the 'Data' tab and select 'User Settings'.
    • Create two settings corresponding to your dropdown filters (Dropdown 1 and Dropdown 2). Ensure their types match the data you expect users to select (like Enum or EnumList).
  2. Use User Settings in a Slice:

    • Create a Slice of your original data table. This slice will be used for both View A and View B.
    • In the 'Row filter condition' of the Slice, use an expression that filters data based on the user settings. For example:
    • AND( [RefColumn1] = USERSETTINGS("Dropdown 1 Setting"), [RefColumn2] = USERSETTINGS("Dropdown 2 Setting") )
    • Adjust this expression to match your column names and user setting names. The expression can be more complex depending on whether you allow multiple selections or want to handle empty filters.
  3. Create or Modify View A:

    • Ensure View A is based on the Slice you created.
    • You can set up the dropdowns in the view to change the User Settings. This will require users to manually trigger a sync after changing the filter settings for the data to update.
  4. Create or Modify View B:

    • Set View B (Chart view) to also be based on the same Slice.
    • Configure the Chart view to use the columns you want to visualize. Since View B is using the same slice as View A, it will only show data that matches the current filter settings in the User Settings.
  5. Sync Behavior:

    • Users will need to sync the app after changing the filter settings in View A for the changes to reflect in View B. This is because User Settings changes require a sync to update the data shown in the views.
  6. Optional: Automatic Update:

    • If you want the views to update automatically without manual sync, you might need to explore more complex solutions like using AppSheet's automation features or dynamically updating a control table. However, this would typically require more advanced setup and might have limitations.

Hello,

Sorry for the late reply, 

I was able to make it work with the manual sync and by adjusting the row filter condition to match multiple dropdown selections or if the filter is empty. 
I am trying to figure out how to update View B  based on the filter of View A
automatically.

Thank you so much, I appreciate.

Top Labels in this Space