Use custom detail view instead of system detail

jsabin
New Member

I am very new at this. I have a single product list table that is searchable by the search glass at the top of the screen. Once I select the search result it goes to the system detail view by default, but I don’t like that look. I know how to create views but I can’t seem to associate the new view details with clicking on the search result.

Do I need to create a view based on a slice? If so, how do I create the slice data to be associated with search result? I have spent days trying to figure out something that should be very simple.
Thx,

0 9 4,141
  • UX
9 REPLIES 9

Hi @jsabin! Welcome to the AppSheet Community!

A Detail view you create will take precedence over the system generated view. You simply need to create the view using the same datasource you are using in the view that you are searching on.

For example, you have a table named XYZ and have created a Table view to show the rows. You will want to create a Detail View of your own using the datasource of table XYZ. When you perform a search in the Table view and click on a resulting row, it should use your customer Detail view to show the details.


A Pro Tip: You can access and change the system generated views. To see them, scroll all the way to the bottom of the UX pane. You will see the link “Show system views”. This will display those views and then you can find the Detail View you are interested in and make the necessary changes to get the view the way you want it.

2X_7_75ae5cac914958b0a2334acc78ba0a931d4684e2.png

2X_6_61f378fe0b162092a7b053463d06f27631105a63.png

Thank you so much for your input John. I created a reference Gallery view using the same data source as my table “Product Details” called “Product Details_Detail 2”. The system details is “Product Details_Detail” When I search for an item in the “Product Detail” view it still defaults to the system view instead of my new view.

Sorry, Detail is a type of view. I was referring to replacing the system Detail view with a Detail view of your own. So the view would have to use the same datasource AND be of Detail type.

Now lets back up. You are showing a Deck view and a Gallery view. These are views designed to show multiple rows of information. It wouldn’t really make sense to select a single row from your search results and then navigate to one of these views designed to show multiple rows. But you can if you so desire.

To navigate to a different view altogether you would use the “Row Selected” property from the view you searched on (note: only certain views will have this property).

Here’s what you do:

  1. Create the view you want to navigate to.
  2. Create an action that navigates to that view. Probably: LINKTOROW([row id], "View name")
  3. In the view you are performing the search, go to its definition and update in the Behavior section the Row Selected property to the Action you created.

In reality you are not attaching process to the search function at all. It is for any row selected in the view regardless if you searched or not.

Hmmm, but now I wonder if there is a way to determine if the app is in a search results pane? That question can be asked if you need it.

jsabin
New Member

Awesome! I’ll mess with this and let you know. The end result I’m hoping for is to make better use of the wasted space on _Detail view. It looks bad like this and the system detail view is limited in its ability to make view type changes.

Right. You will not be able to change the type in any of the system generated views - except inline views, which are for showing lists of data inline of the Form or Detail views.

There are properties you can apply to a Detail view. For example, you can use the “side-by-side” option to show the Label next to data. This makes more efficient use of the screen real estate.

There is also a “centered” option that will list the info down the the center of the screen.

I’m making progress! I have the view created, the action created, and when I click on the searched item I’m taken to my new view. Only problem now is that the new view shows the full list instead of the details of the selected item. I believe this means I need to create a slice and reference that in my new view. Question is how do I make a slice based on the selected search?

It would be nice to see what views you are using.

I made certain assumptions about what you are trying to accomplish. When you say “Only problem now is that the new view shows the full list instead of the details of the selected item.”, this tells me you are using a view aimed at showing multiple rows but you only want to show a single row.

That’s fine its just the expression you would use is different.

Instead of using LINKTOROW() in your action. Try using LINKTOFILTEREDVIEW() instead. It would be something like:

LINKTOFILTEREDVIEW("View Name", [Row ID] = [_THISROW].[Row ID])

jsabin
New Member

That worked like a charm! Thank you so much for the help, and your time. I just have one more small question. The view it takes you to shows this button at the top which says Product View. That’s the name of the current screen view. Do you know how to remove that button?
Thanks,

That button is based on the action you have created. You’ll need to update its Behavior criteria so that it does NOT show when you are in the view just navigated to. You can do this by ADDING to the criteria something like this:

CONTEXT("View") <> "PRODUCT VIEW"

Top Labels in this Space