Jump to content

Find Records Based on Contents of Rows in Portal


VikR

This topic is 3805 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • 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)!

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

This topic is 3805 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.