Hi folks,
I'm having a search challenge that I want to solve in a delegable way and I'm hoping someone has figured this out already or can point out my error.
I have two tables:
PR_MockNRAs
and
PR_MockNLIs
There is a one-to-many relationship between them (one NRA to many NLIs). Therefore, the PR_MockNLIs table has a lookup column called "relatedNra".
I want to display all of the NRAs who have at least one related NLI that meets certain conditions.
My problem is that my formula does not return any results.
To simplify the problem, I have reduced my filter such that it should show any NRA which has at least one related NRI which has a "relatedNra" code that matches the NRA code.
Here is my formula:
Filter(
PR_MockNRAs As NRA,
CountRows(
Filter(
PR_MockNLIs As NLI,
NLI.relatedNra.Code = NRA.Code)
) > 0
)
There are no errors or warnings in the editor but the results count is 0. I have made double sure that I created some test content where there are some NRAs with related NLIs.
Any ideas? I've been searching online and trying a few options but can't get any to work. We do have a way to do this today using local collections (ClearCollect()) but that is not delegable and won't work for a large dataset. I would like to find a better solution.
Thanks