Open MarkMpn opened 2 months ago
This is the expected behavior and has been restricted due to performance concerns. Can you share more about your scenario and what you are trying to achieve?
I have a manually selected collection of records and I want to be able to work with the children of those records. In my case I have a collection SelectedRecords
that is provided by the host app, and I want to be able to sort or filter those records in various ways including references to their child records, eg find the contact within that collection with the most activities.
Although this could lead to performance problems, in the case of a small collection this shouldn’t cause issues. I feel a warning would be better than an error here to allow this to work consistently, with the responsibility on the developer to heed the warning and rewrite the formula in some other way if possible but without blocking the functionality and accepting the possible performance penalty if that is what the developer requires.
I'm encountering an error when I try to reference a child collection within a table formula. I can reproduce it in pac cli, canvas apps and my own application consuming this library, so it's quite possibly my misunderstanding of the language but any advice would be appreciated.
I can successfully get the number of activities associated with a single contact using:
However, if I try to replicate that within a collection of contacts, say all those with the first name "Mark":
I get the errors:
I understand that this is potentially an inefficient formula as it would require the CountRows to be executed for each individual contact, but as far as I can see the
ThisRecord.Activities
should be in scope at the point it's being used?