Formula values not appearing correctly in table view

I have a few formulas in a "People" table that sum up various amounts from another table. These amounts appear correct on each record in Form view. When I look at the data in Table view, the amounts are sometimes incorrect (ie $0). The values in Table view also seem to change when I make unrelated changes to the record - I added another item to the view and the dollar amounts in the formulas either became $0 or became the correct amount.
The formula's seem pretty standard to me, and all are roughly the same:
Donation Formula
let myID := Id;
let x := (select Splits where People = myID and 'Class (Revenue)' = 6);
sum(x.Amount)
I've tried exporting the table to see if the formula values are coming through, but no luck.
I'm stuck as to what I'm missing, or if there is a bug.
7 replies
-
can you post a sample DB with no personal info?
-
Try changing Donations to:
let x := Splits['Class (Revenue)' = 6]; sum(x.Amount)
Try to use reference links whenever possible because it is easier for Ninox to just go through the linked records then to do a select.
For example record 92, only has 1 record related to in Splits. So if you do a select then Ninox has to go get the 45K records from Splits then filter for that 1 record that matches the People and checks to see if 'Class (Revenue)' = 6. Then repeat that for each of the other 91 records in People.
Now if you use the reference field (Splits), then Ninox knows to look at the 1 record linked to 92.
Once I did that then the table view showed the correct info.
Just a thought on your DB.
Your 5 connections tables could be consolidated into one connections table that has a choice field that separates Pets/People, Pets/Pets, People/People, etc. It seems like the main job of the table is to show the connection between entities. To help facilitate that, a child table called Entities would be created as well to list the entities that are connected. This way you can link two entities or three or 100.
-
If it works for you please mark the post "answered" when you get a chance. :)
Content aside
- Status Answered
- 4 days agoLast active
- 7Replies
- 38Views
-
2
Following