In an instance where I have several ref views

(Dâmaso Saraiva) #1

In an instance where I have several ref views for the same table, namely map, deck and table, how do I define which should be used in an inline list within the detail view of a Ref table?

(Reza Raoofi) #2

You could separate some of those views by building them based on slice.

(Dâmaso Saraiva) #3

@RezaRaoofi thanks but I wouldn’t want to have a redundant data table.

Isn’t there a parameter I can pass on the Virtual Column field that generates the list which tells it to render the list using view X?

Or isn’t there a view naming convention that makes Appsheet pick a specific view as the inline list template? (already tried adding “_inline” to my preferred view, no cigar)

If not, what is the criteria Appsheet is using when selecting which view to use to render the inline list? Maybe I can change columns, or recreate the views in such a way that that criteria picks the view I want?

(Steven Coile) #4

Perhaps using the Show_if property of the views?

(Reza Raoofi) #5

@Filipe_Damaso_Saraiv Adding a Slice is not considered redundant data table; you can have several slices from the same table, and by making other views based on slice, you can divert them from showing up in inline view.

To answer your question about AppSheet’s criteria for selecting inline view, it is the REF_ROWS() function in automatically created Virtual Column, and that function only refers to Table/Slice name.

(Dâmaso Saraiva) #6

+Steve Coile how so?

@RezaRaoofi I didn’t mean slices are redundant per se, just that it would be redundant in my case because I’m already using slices for the views in question.

Regarding Appsheet’s criteria for selecting which view to use to render an inline list, I already understand how the list is generated by the REF_ROWS() function, what I don’t understand is how Appsheet decides what view to use to render that list. In my case, Appsheet is picking a map view to render the list, but I would actually prefer to have it as a table.

(Reza Raoofi) #7

Well that is what I meant when I said REF_ROWS() only refers to Table/Slice; meaning it only picks the view based on the table the view is connected too, therefore if you have more than one Ref views that all are connected to the same table, you will lose control, unless you connect all the other views you do not want to show in inline view, to slice, then they will be excluded from REF_ROWS().

Does it make sense?

This might seem redundant, but it is a rare case that helps avoiding a non wanted view (like map) to be shown in inline view, by connecting the map to a slice rather than the actual table.

(Dâmaso Saraiva) #8

@RezaRaoofi it’s unfortunate that there is no way to explicitly tie a certain view to a list virtual column.

I ended up with 3 ref views for the same slice in a use case that I wouldn’t say is rare: - I have a dashboard with a map. I don’t need the map view outside the dashboard, so it is set to Ref. - I have a deck view in order to control the small preview that appears on mobile when you click a place on the map. I don’t need this deck view anywhere else so it is also set to Ref. - I want the inline lists to render as a table, so I added another table view and set it to Ref as well.

I guess I’ll have to assign the undesired refs to the Menu and make their show_if always return false. That should work around the issue without having to mess up my Slices.

Still, if Appsheet could simply pick the view with an “_inline” suffix that’d be great.

(Reza Raoofi) #9

@Filipe_Damaso_Saraiv there is no problem with having several Ref views, setting up dashboard and all; I am just suggesting to create a slice e.g. Ref_Slice that has all necessary columns you need for the map view, then make sure your map view is based on the slice. And only the Ref table view is based on the actual table name, so the inline view doesn’t get confused and picks up the one and only Ref view that is based on the actual table rather than Slice. This solution should work.