Hi,
I am trying to fetch all registration number whose effective date and expiration date lies between project invoice date.
I have written the below query to fetch registration numbers but its returning only current value and not all values.
while select dirPartyLocation
where dirPartyLocation.Party == curCompany.RecId
join taxRegistration
where taxRegistration.DirPartyLocation == dirPartyLocation.RecId
&& taxRegistration.ValidFrom <= projinvoicejour.invoicedate
&& taxRegistration.ValidTo >= projinvoicejour.invoicedate
On debugging I can see that while loop runs only once and for the current value shown in front end too.

Whereas when I remove filter on current records I can see the registration number I want (whose date is between invoice date of my project invoice)

While loop does not run for this data even if I remove date filter.
Please help.
Thanks,
Priya