Show if constraint for view with Context("Table")

I'm trying to set a Show if constraint for a certain view with the CONTEXT("Table") function, but it won't work... I've tried to remove spaces from the table name, tried using the data source name too — nothing works.

Here's part of my Show if expression: CONTEXT("Table")="PRODUCT_DB"

(PRODUCT_DB = Table name)

Anyone would be able to help on this?

Thanks in advance!

Solved Solved
0 3 178
1 ACCEPTED SOLUTION

I typically follow Appsheet's default View naming schema wherever I can, which means the table name is the first part of the view name. In such a case, to accomplish your goal (or at least how I interpret it, it's not 100% clear), you could use STARTSWITH( CONTEXT("View"), ... ).

I can't imagine a situation where this would help though. Views can only be set on a single table, so why would there be an "inside" view on a different table that you'd just be hiding anyways.

View solution in original post

3 REPLIES 3

I don't think CONTEXT(Table) is available in the context of a View's show_if. As you navigate through different views of your app, you aren't navigating between table contexts. Table context is really only available when you make a data change. What are you trying to do?

Thanks for your feedback Marc!

I’m trying to have some views show only when navigating within specific views, but listing them all would be super long and would require adding potential new views to the Show If constraint — I was trying to find a way to show that specific view only for views within the same table(s)

does that make sense?

I typically follow Appsheet's default View naming schema wherever I can, which means the table name is the first part of the view name. In such a case, to accomplish your goal (or at least how I interpret it, it's not 100% clear), you could use STARTSWITH( CONTEXT("View"), ... ).

I can't imagine a situation where this would help though. Views can only be set on a single table, so why would there be an "inside" view on a different table that you'd just be hiding anyways.

Top Labels in this Space