3 Replies Latest reply on Mar 22, 2013 3:22 PM by philmodjunk

    Table Occurence not doing what I want



      Table Occurence not doing what I want


           Here I am again with the same problem.

           I have a table of Contacts and a related table of ContactTypes: there are Jobseekers, Employers etc. and the ContactTypes contains one or more records per Contsct.

           I set up a Table Occurence of Jobseeker_Contacts related to Jobseeker_ContactType by

           Jobseeker_Contact::PKContactID = Jobseeker_ContactType and

           Jobseeker_Contact::cJobseeker = Jobseeker_ContactType::ContactType where cJobseeker is a calculated field containing "JobSeeker"

           The I created a layout for jobSeekers onlt base on Jobseeker_Contact, but it in fact has all of the records in the file listed, not just jobseekers.

           What is wrong with my structure?


        • 1. Re: Table Occurence not doing what I want

               Relationships have no effect on what records appear as the found set of records for a given layout unless a Go To related records step is performed in a script.

               For any given table occurrence, all the records in the underlying data source table are accessible from a layout based on that layout and the total record count will reflect that in the status area toolbar.

               Thus, selecting a specific table occurrence for this layout will not automatically limit the total records shown/accessible to just Job Seekers.

               There are ways to use scripts, custom menus or portals to limit the listed records to just Job Seekers, but simply creating a new table occurrence and basing your layout isn't the way to do that.

          • 2. Re: Table Occurence not doing what I want

                 Well, that destroys that illusion!

                 So that means if I want a layout restricted to any filtering, I do it by script. I can do that.

                 I looked at Go To Related Record and it appears that a Find in the script is the way to do it.

                 Now I get back to a Value List. In the above example, how would I create a Value List of only Jobseekers PKContactID and Name?

                 I can't run a script to filter the tables I use.

                 Thank you for your patience, Phil!

            • 3. Re: Table Occurence not doing what I want

                   Didn't we cover that in a previous thread?

                   There are two types of conditional value lists that can be set up to list only the contact ID's and Names of those contacts marked as "jobseekers".

                   One uses a calculation field that is blank for all contacts that aren't job seekers and the other uses a relationship that matches only to contacts that are jobseekers..

                   If I remember correctly, you use a related table for listing "types" for a given contact. That actually complicates this process. If you used a single text field defined in the contacts table with a checkbox format for specifying the relevant types for each contact, both the relationship and calculation field based methods are simpler to implement.