Row filter condition for multiple IN values

Hi all!

I have been customizing this sample app Order Capture and I am currently trying to edit the Row filter condition for the ‘Open Order Details’; slice

The sample app uses an IN(SELECT()) expression to match Order Details with Orders, that have a Status = “Open”

I have modified the source data and now have another Status type called “Pending”, for app sheet purposes the two Status types are the same, so I am trying to modify the IN(SELECT()) expression to allow for both Status types

The app creators original expression is:

IN(“OPEN”, SELECT(Orders[Order Status], [Order Id] = [_THISROW].[Order Id]))

My failed attempt so far is:

OR(
IN(“OPEN”, SELECT(Orders[Order Status], [Order Id] = [_THISROW].[Order Id])) =TRUE,
IN(“PENDING”, SELECT(Orders[Order Status], [Order Id] = [_THISROW].[Order Id])) = TRUE)

Am i on the right track or should i be using the ANY() expression?

Thanks

Solved Solved
0 4 1,286
1 ACCEPTED SOLUTION

I think you’re confusing views and slices my friend, remember that slices are subsets of data extracted from a given table, and views are the way in which the app shows you this data.

If you want to have an inline view of a slice from a table you have a reference with, you need to set up a ref column with a ref_rows() formula pointed at the slice, it’s basically the same as the system generated virtual columns called “Related something”, but in this case pointing at the slice instead of the table.

Brotip: never modify those system generated virtual columns

Also, you need to create a view for each slice you want to use, in your case, it would be a table view, since you want to use it as a inline view, if your slice doesn’t have a view it won’t show !

View solution in original post

4 REPLIES 4

Hello @Steve_Chambers , why is it a failed attempt? what’s the error or problem you’re encountering?

Hi Rafael,

The expression assistant is not failing, its giving me the green tick, however the associated rows are not showing in the view I think they are supposed to be showing in, however if the expression is correct then its my lack of understanding how these views are connected perhaps.

In the sample app there is a main view type called Orders, if you click on one of the orders it open a system created view called Open Orders (slice), inside this view there is a section called Open Order Details (x) which lists the Order details for that order. These are nested rows that match the Order Id.

My Orders that have their status set to ‘Pending’ can be viewed here however this nested row section is missing.

I think you’re confusing views and slices my friend, remember that slices are subsets of data extracted from a given table, and views are the way in which the app shows you this data.

If you want to have an inline view of a slice from a table you have a reference with, you need to set up a ref column with a ref_rows() formula pointed at the slice, it’s basically the same as the system generated virtual columns called “Related something”, but in this case pointing at the slice instead of the table.

Brotip: never modify those system generated virtual columns

Also, you need to create a view for each slice you want to use, in your case, it would be a table view, since you want to use it as a inline view, if your slice doesn’t have a view it won’t show !

Thanks,

I followed your logic and found a show_if constraint of the referenced column

much appreciated !

Top Labels in this Space