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:
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.
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
Ref table Stores
Ref table Categories
On the app display, I get these results.
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
Solved! Go to Solution.
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.
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:
With this setup the app selects all rows
here is another try at this:
I get an error message...
Another attempt at specifying row selection:
Another attempt to make the software happy...
What is the trick with the "Yes/No" column feature?
Thanks
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.
User | Count |
---|---|
20 | |
16 | |
4 | |
3 | |
2 |