Dynamic Dashboard with Dynamic Views

Wondering if there is a way to create a Dashboard that can show or hide a view based on a value in the table. In the views there is a show if expression I thought would let me do this. Here is an example of what I am trying to do. 

Select Reports icon (Behavior)

ReportsReports

Select Tasks icon (Behavior)

TasksTasks

I can do this with two dashboards and switching between them but i wonder if the showif can be used to do this in one dashboard

Solved Solved
0 6 308
1 ACCEPTED SOLUTION

Thanks, I'll give that a try!

View solution in original post

6 REPLIES 6

I believe generally you should be able to do the needful. If you have a Users table, you could save a  ( Y/N) column through  a view drawn on the user table  in the dashboard. If that value is Y, show reports related view, if that value is N, show the tasks related views in the dashboard.

You could use Show_if  settings of views to depend on this Y/N column from the Users table. With User based settings in the User table each user could chose the option she/he wants. Alternatively if the use of any option of the dashboard ( reports or tasks) is more persistent in any one particular option of the two you could use User settings as well to set the two options.

i think i tried what you suggested but the show_if presents this error "This formula is not evaluated in the context of a row, so column values are not available." so it wont work...

I request you to carefully go through the suggested approach. 

When there is a Users table with one row per user and one column being email of that user, and one or more columns for user specific settings, you can implement the suggested approach. In the example below when the expression is evaluated with respect to the row, it gives error, as expected.

Suvrutt_Gurjar_0-1672109884565.png

However , when the expression is evaluated with the USEREMAIL() that gives the email of the logged in user, the expression works properly. In this example the view will be shown to customers whose [State] is "WA"

Suvrutt_Gurjar_1-1672110018236.png

 

This technique is explained in the article below under the topic "Use lists to show and hide views". The crux is the technique uses USEREMAIL() that is always available for the logged in user and not row based expression.

List expressions - AppSheet Help

Note: This technique is not to be confused with security filters. The technique merely conditionally hides the views from users. It does not prevent the associated date from reaching the device.

 

 

 

 

Thanks, I'll give that a try!

I got it working!

This is the view if command that I used.

if(Any(Select(Users[ViewType], [Email]=USEREMAIL())) = "Services", true,false)

So I added a column to the users sheets called ViewType. Then in the Vie I added the formula above. When I set the field to "Services" that view shows. AWESOME!!!

PS I was worried about Latency but the response is very quick and the views show in a second or so... Great!

 

Great. Thank you for the update.  Nice to know that the suggested solution works.

Top Labels in this Space