In an instance where I have several ref views

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?

Solved Solved
0 8 717
1 ACCEPTED SOLUTION

@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.

View solution in original post

8 REPLIES 8

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

@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?

Perhaps using the Show_if property of the views?

@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.

+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.

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.

@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.

@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.

Top Labels in this Space