Hi everyone - I have a problem with a view, b...

(Andrew Eills) #1

Hi everyone - I have a problem with a view, based on a slice, that sometimes does and sometimes doesn’t update until after a sync.

I have read a few posts about using VCs and references to ensure that slice filters are calculated within the app, but I’ve had no joy getting this to work.

I’ve put together a test app to try and understand how to get this functionality in my full app, and it has the following structure:

Table L - a link table to provide a many-to-many join between table A and table B which are both referenced from L Table C - which is a child of table B

Table L has a VC called “Related Cs” which is a deref to the “Related Cs” ref_rows VC in table B.

I did this to make computation of the slice quicker in the full app by avoiding multiple, nested IN/Selects.

My slice lists the child Cs of rows in B that have a reference to the maxrow of table A via table L, with the formula:

In([CID], Select(L[Related Cs], [AID]=Any(A[MaxrowA])))

It all works fine, except for the fact that very often, I have to wait for the delayed sync to happen, before the view updates with the proper (current) results.

Can anyone give me any pointers on how to have this all happen within the app?



(Simon Robinson) #2

So it’s probably related to how Appsheet handles virtual columns.

When you’re in the form view the VC updates ‘live’.

You change an item, the VC updates.

But when you see VC’s in a detail or table view your only seeing the VC value that was calculated at the last sync.

(Andrew Eills) #3

Hi Simon - Thx.

I changed the app so it is a form that initiates things.

On the form, the Changetimestamp column changes when I click an enum toggle column, but the VC (Maxrow) column doesn’t show a change.

However, it does change, once I’ve saved the form, and does this before the sync, as you said.

Unfortunately, even with this set up, I am experiencing the same behaviour with the slice.

I’m starting to wonder whether it is the fact that the slice formula - In([CID], Select(L[Related Cs], [AID]=Any(A[MaxrowA]))) - is comparing against a deref column (L[Related Cs]) rather than a ref column.

(Simon Robinson) #4

I’ve not heard that be a problem before.

Not sure why you’d need Table L though.

You can multiple columns which Ref other key columns

(Andrew Eills) #5

The problem, I think, may be the many-to-many link table which enables any permutation of multiple refs between As and Bs (via Ls), but which means no direct refs between A and B.

I’m going to play with using deref As in table L to initiate things (as though they were initiated from table A), on the basis that L is referenced with B and hence C.