Format Rules Delay when referring to the Parent Table

My Parent Table has a [Color] column.
In the Child Table I use Format Rules according to the color in the Parent’s table like [Parent].[Color]=Green
I also added a Virtual Column to the Child Table to get the color value from the parent table with [Parent].[Color].

As you see in the Video, there is a delay: It will sync and after syncing, the Format Rule will be applied AND the Virtual Column with [Parent].[Color] will be calculated.

Can we reduce this delay in Format Rules?

3X_e_f_ef1b129c029b175fad77c9bdd13455c932faadce.gif

I found a note from @Adam that maybe related to this issue.

Solved Solved
3 11 424
1 ACCEPTED SOLUTION

AppSheet finally fixed this problem. Thank you @Gil
So now the Map Pin get’s formatted immediately.
Because I use a deref expression in the format rule.
In the Table view I use a VC with the same deref expresion. But this needs a sync to calc. And also the Format rule based on that VC needs a sync to be applied.

3X_f_1_f157724681753325a8e8f47e514a382fed68f7a3.gif

To conclude I think this statement is true:

When we use a deref expression in a format rule, it will be applied immediately. No need for sync. Like: [Parent].[Color]
The same deref expression in a VC will need a sync.

View solution in original post

11 REPLIES 11

Hi @Fabian
It looks to be AppSheet native behavior.
On your child table you are using virtual column where you repression kicked in. Virtual column calcuation which is dependency over the other rows or tables are always need to wait until sync complete.
That s the reason.

Hi @tsuji_koichi I added the VC just to check. I understand, that this VC needs a sync to calculate.
But the Format Rule should not need a sync.

In this Video I

  • Open the App in the Parent’s Deck View
  • I change the color
  • I then open the detail view for the first time
  • The Format Rule will be applied without the need of a sync
  • The VC needs a sync to be calculated (that’s okay)

This is working only if I don’t navigate in the detail view before. If so, AppSheet seems to remember the format rule and it will need a sync to update it.

3X_e_c_ec16ac7e48d32ddb7aa1ae84610b15f9295c8e70.gif

This is interesting. Not sure how it comes.
Behavior is changing based on from which view the action (for data change) is fired. Will see AppSheet masters will coach to us.

Based on the facts you shared, the detail view is going to be generated after hitting deck view firstly, then it will pulling data from clients side to apply the format rule, while we need to wait vc data is refreshed by sync. Entirely not sure how and why it comes.

Virtual column values are only updated by the device when a non-virtual column value of the same row is updated as a result of user interaction with the app. All virtual columns are updated when a sync occurs, in which case the virtual column values are computed by the server.

@Steve has been explained this briefly on the other post, from where my knowledge is coming from.

All in all, the delay in applying the new format rule to column based on VC is kind of by design I would say.

Steve
Participant V

Just a few weeks ago I noticed that format rules that rely on data in other rows experience this delayed update behavior. It appears to me that format rules are, in fact, reevaluated as are virtual columns: they see changes in columns of this row immediately, but don’t see changes in other rows until a sync happens. I don’t know if this is new behavior or long-standing. I don’t know if it’s considered a bug or not.

I wrote to support@appsheet.com on 09.Feb.2021 about this. Back then I didn’t understand that it has to do with the referring to another table. AppSheet Support was not able to help me.

My goal was to use XY map view with Format Rules.
Now I found a workaround to get it done without the delay:

  • I added a Virtual Column to my Child Table with the expression: [XY] So it’s just a copy of my XY column. I named this column [XY_VC].
  • I made 2 map views: One with the map column [XY] and one with the map column [XY_VC].
  • I changed my action into a grouped action that: changes the color in the parent table AND navigates to the second map view.
  • In the format rules I marked both columns: [XY] and [XY_VC]

In the Video you see the Detail view with the first map view as the inline view.
It then navigates to the second map view.
Since the column [XY_VC] ist not shown in the detail view, the App does not “remember” how it is formatted. By navigating to the second map view, it get’s formatted for the first time.
For sure this workaround is working only once. But for my use case this is ok.
.

I also tried other workarounds but with no luck:

  • Using another map view with the same map column [XY]
  • Using a slice with it’s own map view

Maybe someone has another idea?

@Adam should be the only one gent to give us insight for this type of subject.

AppSheet finally fixed this problem. Thank you @Gil
So now the Map Pin get’s formatted immediately.
Because I use a deref expression in the format rule.
In the Table view I use a VC with the same deref expresion. But this needs a sync to calc. And also the Format rule based on that VC needs a sync to be applied.

3X_f_1_f157724681753325a8e8f47e514a382fed68f7a3.gif

To conclude I think this statement is true:

When we use a deref expression in a format rule, it will be applied immediately. No need for sync. Like: [Parent].[Color]
The same deref expression in a VC will need a sync.

Expressions using in VC with expression which is depending on the other table is always needing to wait for a sync to complete.
The same expression used in somewhere else such as format rule or filter condition for slice is NOT like that, that the native behaviror I did noticed before, and looks still valie even for now.

I tried it Using EnumList Ref and the format rule is found working only in form view and it was not working in any other views.


Here is the condition I used.

Top Labels in this Space