December 18, 201312 yr Newbies I have a layout that contains a portal. The portal shows rows which contain dates. The master table (the "one" table in the "one-to-many" relationship) has two global fields, gStartDate and gEndDate. I would like to have a script that would do a find that would select all the records in the master table, that have related rows in the portal table, that fall within these two dates. What is the correct way to do this? Thanks very much in advance to all for any info (or alternate approaches)!
December 18, 201312 yr Author Newbies It appears that the correct way is to put the filter criteria (in this case, the date range) into the relationship between the two tables. I previously had it in the portal filter. Once it's in the relationship, you can add a calculated field to the master table to count the number of related fields in that date range. Then it's easy to do a find for when that calculated field > 0.
December 18, 201312 yr It appears that the correct way is to put the filter criteria (in this case, the date range) into the relationship between the two tables. I previously had it in the portal filter. Once it's in the relationship, you can add a calculated field to the master table to count the number of related fields in that date range. Then it's easy to do a find for when that calculated field > 0. This is a rather roundabout way, not to mention that you'd searching within a non-stored field that serves no other immediate purpose. A better way would be to navigate to the child table, search for children that fall into the date range, then go to the related parents of the found set (if there is one).
Create an account or sign in to comment