Jump to content

Searching from Portal in Grandparent?


hiredman

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

Recommended Posts

  • Newbies

Hello All,

I have a "case" record with a PK of case_ID that has a to-many relationship to an "event" that uses case_ID as its parent_ID.

The "event" child has an event_ID as a PK which has several to-one relationships with different "event" detail records which in turn uses the event_ID as its parent_ID. (It also as case_ID assigned as case_number as information but not used in the relationship scheme.)

Inside case I have a series of layouts that displays the details of a single event child at a time with "previous" and "next" arrows to show all the child event records - which are essentially grandchildren. I have a calculated value in case called child_id_for_pipeline which is the event_ID from the current event file. I use that calculated variable in a relationship between case and the event subrecords parent_ID and all that works fine. I can display, edit and scroll through the children and parents and all that.

The only problem I have is that I can't search within those portals. I'm guessing because the value I use to establish the relationship is calulated it works fine for everything but searching - I always receive a "No records match that search" message with cancel and modify options.

One solution I thought of is to make a second relationship that links case_ID to case_number in the grandchildren records and replicate the layout with this relationship when you press the "Find" button but I'd rather have a solution that works even if the user chooses the "find" shortcut rather than forcing people to use the button.

Is there an easy solution I'm missing?

Thanks,

=Tod K

Link to comment
Share on other sites

Hi Tod,

In order to search in the parent file on child (or grandchild) record data, the left key (PK) of the relationship to the file/data you are searching on must be stored. This is because calculations are disabled in Find mode, and therefore unstored calcs cannot be evaluated in order to activate the relationship and thus locate the records you're searching on.

Perhaps the simplest solution would be to replace the calculation system by which you are currently generating the keys to activate the relationship to the grandchild event records with a data field and a pair of scripts which selectively populate it with the appropriate values (ie to browse forward and back through the related event detail records for a given case). Once you have a script parsing out the relevant ID values and placing them into a data-field key (in place of your unstored calculated key fields), searching on related data should become possible. wink.gif

Link to comment
Share on other sites

This topic is 7390 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.