Filter function workaround in appsheet?

Hello

How to convert a filter() function from google sheet to appsheet?

I have been building an inventory management app. Currently I have "Database" as main sheet where all products and parts are listed. For each product I have separate sheet and the Filter() function pulls necessary data from database to the corresponding product sheet. All sheets including database have basically same build up (columns from left->right : ID, Product type, quantity, image etc). Although i cannot change the values in my app due to the filter formula. All data that is pulled with the filter formula, are automatically set as "read only" in the app. the biggest problem is that i can't change the quantities of the parts. My filter function looks like this: 

=FILTER(Database!A2:D,(Database!B2:B="Orthopedic")+(Database!B2:B="Springplunger")) 

I am using 2 conditions, if the "Product type" matches to the condition it gets pulled to the sheet, I need 2 conditions because some parts are necessary for multiple products.
I am really beginner at this, so if my whole build up is bad then all advices are welcome.                                        
Thanks in advance!

Edit: One workaround would be to get rid of "Database" sheet, which means that on the "product sheets" all the data is actually there, not pulled from somewhere else. In that case i can get rid of the sheet formula and the data turns from "read only" to "editable". Downside is that some parts belong to several products and if i use those parts and want to change the quantity then i have to do that on every sheet which is annoying, right now i have a script that overwrites the quantity in the database after editing on the product sheet, and the other product sheets get synced according to the number in database.

Solved Solved
0 10 1,711
3 ACCEPTED SOLUTIONS

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Krismar 

This may help you:

FILTER() - AppSheet Help

 

FILTER(
  "Database",
  OR(
    [Product Type] = "Orthopedic",
    [Product Type] = "Springplunger"
  )
)

You may want to try a slice instead, though:

With this row filter condition: 

  OR(
    [Product Type] = "Orthopedic",
    [Product Type] = "Springplunger"
  )

For reference:

Slices: The Essentials - AppSheet Help

 

 

View solution in original post

I think you would like to use this, for a start:

Aurelien_0-1677761739891.png

Aurelien_1-1677761819205.png

Then, create a view based on this from this panel:

Aurelien_2-1677761851758.png

 

 

 

View solution in original post

Slice is treated basically as another table.

About your image question, you may want to create ร  New view, and set the slice as the data source of this view ๐Ÿ™ƒ

 

About your syncing question, if there is no red circle after ร  few seconds when you make a change, then that means the change has been applied to your datasource. 

View solution in original post

10 REPLIES 10
Top Labels in this Space