Can I have multiple inline views for a detail...

(Anke H) #1

Can I have multiple inline views for a detail table and control which one to use based on a value in the parent row? For instance, the parent table has a [sortBy] column with the name of the column to sort by and to display in the inline view.

I was not able to figure out how I can a) use variables in “Sort by” and “Column order” of the inline view b) control which inline view to use based on a parent value in “Show_if”

Thanks, Anke

(Reza Raoofi) #2

You can have a different view based the inline table (detail table) and set that view’s position to Ref, then the inline view will show that Ref view which could have a custom Sort Order or Column Order, but you cannot variably change Column Order or Sort By, however in table view tap/click on column header will change the sort by too.

Regarding Show_if, you can use CONTEXT(“View”) function to check what the current parent view’s name is.

Check out this article: http://help.appsheet.com/expressions/expression-types/other-expressions

(Anke H) #3

@RezaRaoofi Thanks for getting back to me Reza. I already have a custom view with the Context(“View”) condition but the problem is I need multiple different inline tables, each showing a different child column depending on a value in the parent record. So I was hoping for a way to either access the parent’s record value in the inline table’s show_if condition or somehow pass in some other value to use it for the show_if condition. Having slept over this a night, I think I need to create different slices for each of the columns which then have different names with different views associated to them. I’ll try that approach today.

(Reza Raoofi) #4

Well, it was not clear to me whether you were asking how to make more than one inline view, or you already had multiple inline views, and you were wondering how to show/hide them.

Regarding how to make them, like you mentioned in your previous comment, yes, you need a Slice based on the same detail table for each additional inline view, and then use REF_ROWS() function in a Virtual Column referring to that slice.

As for showing/hiding them; you can have different views for parent table, and check that view’s name in the Virtual Column’s Show_if using CONTEXT(“View”) function.