3 Replies Latest reply on May 30, 2012 9:24 AM by philmodjunk

    Relationship not working. =(

    CodyRomphf

      Title

      Relationship not working. =(

      Post

      Hi,

       

      Problem: The relationships I have created are not working. 

      What I have done: Created 2 tables, the 1st "References" the 2nd "Extractions". I have two fields in the "References" table. 

      1st - Reference List - Information is imported from file containing text.

      2nd - Reference_ID - Auto inputted serial number from Reference.

      I have also created 2 layouts.

      1st - Called Reference that displays info from "References" table, shows all the references in list form.

      2nd - Called Extractions that displays info from "Extraction" table.

      I have created two relationship as such,

      1st - References::Reference List .... = .... Extractions::Reference

      2nd - References::_kp_reference_ID ..... = ..... Extractions::_kf_reference_ID

      What I am trying to do: My hope is that I can display the reference and reference_ID on the Extractions layout through the relationships I have made. This way in my extractions table I can create a series of extractions that are directly linked to each Reference.

      It does work if I associate the extraction layout with the reference table. But then why I create a new record it creates a new reference and not a new extraction. I hope this makes sense

      When I navigate to my other layout the fields that should contain the reference and reference_ID are blank. I cannot figure out why.

      Thanks in advance, if further clarification is required let me know.

       

      Cody

        • 1. Re: Relationship not working. =(
          philmodjunk

          Do you have two relationships or one relationship that matches on two pairs of fields?

          I don't see any purpose for matching Reference List to Reference in a relationship, but then I don't know what kind of data (other than that it's text) is stored in these two fields.

          Best guess is that you need this relationship:

          References::_kp_reference_ID = Extractions::_kf_reference_ID

          With the relationship matching only on those two fields.

          If you enable "allow creation of records via this relationship" for Extractions in this relationship, you can put a portal to extractions on your references layout and you can create new related extractions records by entering data directly in this portal.

          It is also possible to create a new record on your extractions record and link it to a selected References record by formatting the _kf_reference_ID field as a drop down list of values from _kp_reference_ID.

          • 2. Re: Relationship not working. =(
            CodyRomphf

            I have two relationships.

            1st - References::Reference List .... = .... Extractions::Reference

            2nd - References::_kp_reference_ID ..... = ..... Extractions::_kf_reference_ID

            I don't see any purpose for matching Reference List to Reference in a relationship, but then I don't know what kind of data (other than that it's text) is stored in these two fields.

            I assumed I had to relate these two fields that way when I associate my Extractions layout with my extraction table. I can display the reference in the table that it is not primarily associated with. If this is incorrect logic that can be fixed. The type of data that is stored is a block of text in the reference field. The reference_ID field only stores a number.

            It is also possible to create a new record on your extractions record and link it to a selected References record by formatting the _kf_reference_ID field as a drop down list of values from _kp_reference_ID.

            This would work fine enough, but there are over 1500 reference records. So scrolling through the drop down list will get tedious very quickly.

            • 3. Re: Relationship not working. =(
              philmodjunk

              I can display the reference in the table that it is not primarily associated with.

              How's that again? Don't you want to associate an extractions record with the reference from which it was extracted?

              there are over 1500 reference records. So scrolling through the drop down list will get tedious very quickly.

              I've described two simple ways to link extractions records to references. More sophisticated methods can also be set up. You can use a script to capture the ID of the current References record on the References layout into a global variable, then any new records in Extractions can be set to auto-enter the contents of that global variable into the kf field each time a new extractions record is created.

              There are also ways to break up your value list into smaller subsets of values if your references records can be identified as being a a member of sepecific categories--you select the category first and then your two colum value list with KP values as field 1 and a description field as field 2 only lists values from references that are part of that category.

              And there are ways to use search portals and auto-complete enable drop down lists to make searching a long list of values filter down to a small subset of matching choices.