Selecting code specific rows in a table for the app display and displed values in REF columns

 

I would like some guidance on the best method to filter select table rows to be shown on the app panel.

I have been working on the Show-If on the view panel and have not found the right coding syntax to accomplish showing only rows where the [Selected] column has Yes “Y”, any attempt has resulted in syntax errors.  This column in the table column definition is set to the yes/no type.

I can show all the different coding that failed but that is not what works.

The first question is the view panel the correct place to attempt this need?  If not then where?

Here is the data I have setup:

Gene_H_0-1736476387433.png

 

  

Below,  is what I am trying to achieve, I have used the table edit panel and using a filter function ‘Selected’, only the table rows are shown.

Gene_H_1-1736476387441.png

 

 

My second question is about understanding why I get the key values displayed for a column [Store] on the app display.  I have another column [Catergory] with the same issue.

These 2 columns are setup as 'ref type' to another table in the same database, these table has valid values to be used.

This is the first level table that references the sub-level tables

 

Gene_H_2-1736476387445.png

 

Ref table Stores

Gene_H_3-1736476387447.png

 

Ref table Categories

Gene_H_4-1736476387450.png

 

 

On the app display, I get these results.

Gene_H_5-1736476387453.png

 

 

Under Store, I want the actual data value in the column.

I appreciate any help!

PS: I have done code programming for many years and worked with various software vendor software, I  am familiar with Database concepts and SQL.  Also, I know each software has its way and approaching the no-code method.

Thanks

Gene

 

Gene_H_6-1736476387466.png

 

 

Solved Solved
0 3 133
1 ACCEPTED SOLUTION

Steve
Platinum 5
Platinum 5

Please note that I do not use AppSheet Database and that I recommend against its use. I don't know what if any changes might be needed in the database to address your concerns.

@Gene_H wrote:

I have been working on the Show-If on the view panel and have not found the right coding syntax to accomplish showing only rows where the [Selected] column has Yes “Y”


Show if for a view only affects whether the view itself appears as an option in the main menu or along the bottom navigation bar, or appears in a dashboard view; it has nothing to do with what is shown within the view itself and cannot be used to show or hide individual rows.

Show? for a column only affects whether the column itself of a particular row is displayed to the user; it also cannot be used to show or hide individual rows.

The only ways to control which rows appear in a view are to base the view on a slice that itself chooses the rows to include, or to use a filtered view used used for inline List columns or as targeted with a LINKTOFILTEREDVIEW().

To use a slice, create a slice on the table, then attach your view to the slice rather than to the table itself. The view will then display the rows chosen by the slice rather than all the rows in the table. Note that you can have multiple views, so you could have one view on the table to show everything, and a view on the slice to show only the selected items.

The user themselves can also filter rows in some view type from the app's built-in search bar. This is closest to the behavior you refer to in AppSheet Database.


@Gene_H wrote:

I get the key values displayed for a column [Store] on the app display.  I have another column [Catergory] with the same issue.


When a Ref value is displayed, AppSheet will display the value of the label column of the row referred to by the Ref value. Make sure the label column of the referenced table is set to the column with the value you want displayed instead of the key value.

View solution in original post

3 REPLIES 3

Steve
Platinum 5
Platinum 5

Hi Stev, I have been through these help panels multiple times, I have tried to follow their vague directives and still get an error message.  Most of this software's documentation is vague and has many between-line assumptions.  I need that info that is between the lines to get me started at the right place.

Here is one of the attempts:

Gene_H_0-1736540415436.png

 

With this setup the app selects all rows

Gene_H_1-1736540530698.png

here is another try at this:

Gene_H_2-1736540644661.png

I get an error message...

 

Another attempt at specifying row selection:

Gene_H_3-1736541018934.png

Another attempt to make the software happy...

Gene_H_4-1736541143654.png

What is the trick with the "Yes/No" column feature?

Thanks

Steve
Platinum 5
Platinum 5

Please note that I do not use AppSheet Database and that I recommend against its use. I don't know what if any changes might be needed in the database to address your concerns.

@Gene_H wrote:

I have been working on the Show-If on the view panel and have not found the right coding syntax to accomplish showing only rows where the [Selected] column has Yes “Y”


Show if for a view only affects whether the view itself appears as an option in the main menu or along the bottom navigation bar, or appears in a dashboard view; it has nothing to do with what is shown within the view itself and cannot be used to show or hide individual rows.

Show? for a column only affects whether the column itself of a particular row is displayed to the user; it also cannot be used to show or hide individual rows.

The only ways to control which rows appear in a view are to base the view on a slice that itself chooses the rows to include, or to use a filtered view used used for inline List columns or as targeted with a LINKTOFILTEREDVIEW().

To use a slice, create a slice on the table, then attach your view to the slice rather than to the table itself. The view will then display the rows chosen by the slice rather than all the rows in the table. Note that you can have multiple views, so you could have one view on the table to show everything, and a view on the slice to show only the selected items.

The user themselves can also filter rows in some view type from the app's built-in search bar. This is closest to the behavior you refer to in AppSheet Database.


@Gene_H wrote:

I get the key values displayed for a column [Store] on the app display.  I have another column [Catergory] with the same issue.


When a Ref value is displayed, AppSheet will display the value of the label column of the row referred to by the Ref value. Make sure the label column of the referenced table is set to the column with the value you want displayed instead of the key value.

Top Labels in this Space