New Bug Encountered: Format with CONTEXT("ViewType") not working properly

Iโ€™ve made an app to demonstrate the issue Iโ€™ll describe here. Itโ€™s called โ€œFormat testโ€ and can be found here.

https://www.appsheet.com/portfolio/230844

What I want to do is make the Japanese column big in the detail view but not in the deck view. So, I used the following condition:

It works at first:

2X_3_3c76a932a34ff25e4f596d70771a877d377f3b80.png

But when I navigate from the table to the detail view, it no longer works:

2X_a_ab8e8a0c77c4791928fa16e69ffe6c15c8ebfcfd.png

2X_4_4b5ec8ac9246c52de0195909f540270497e9bffb.png

By the way, I was also unable, in a different app, to get it to distinguish on the basis of the view name. In either case, the app seems to โ€œrememberโ€ the format that it applies to the table view and does not adjust when the user navigates to the detail view.

Thanks in advance. I hope this can be fixed easily.

Solved Solved
0 7 819
1 ACCEPTED SOLUTION

Recently, I have been avoiding โ€œcontextโ€ expressions with format rules. Instead, I make virtual columns that I only use in contexts where I want the rule to be applied and then make a format rule just for that virtual column. That seems to work well.

View solution in original post

7 REPLIES 7

Even though Iโ€™ve been using AppSheet for a while and should know how to share a prototype on my โ€œfreeโ€ account, I still wind up getting messages like this. Iโ€™m requiring sign in, but Iโ€™m the only user and I expect people to copy my app if they want to look into it in. If someone could help my understand the proper procedure for sharing prototype apps on a free account, Iโ€™d appreciate it.

Hi @Kirk_Masden I posted a tips and tricks, hope that helps. App needs to be deployed. Profile apps are free.

By the way, itโ€™s interesting to me that the order of operations seems to make a difference.

  1. Start with the table
    2X_7_788db37101753670ea45e85ab450bac626dd6a9d.png
  2. Tap to view
    2X_c_ca2e90265b18a2f8189af24f17608c225134d060.png
  3. Tap on the refresh icon
    2X_7_7c7872a86fee7f9a5a3b56339471cfa791e57f94.png

This suggests a format ruleโ€™s condition is evaluated only at sync-time, not dynamically as the user interacts with the app. Similar to the way an app formula is only evaluated on sync (except in forms).

I can confirm that other format rules work without syncing. Also, even after the refresh (sync), if I navigate back to the table view and then tap on one of the records to view the detail view, Iโ€™m back where I started โ€“ the format is gone again. So, I think itโ€™s a matter of some kind of influence that the table view has on the related detail view that follows it โ€“ not just sync issues.

For now, Iโ€™ve resolved the problem by using a VC column to make a duplicate of the column I need to format differently in different contexts. This has allowed me to make format rules that are not dependent on context (โ€œMake column A normal size and make column A-VC bigโ€ etc). I just need to decide which column to make visible in various views. Still, it would be nice if context expressions worked reliably in format rules.

@morgan Any thoughts?

Recently, I have been avoiding โ€œcontextโ€ expressions with format rules. Instead, I make virtual columns that I only use in contexts where I want the rule to be applied and then make a format rule just for that virtual column. That seems to work well.

Top Labels in this Space