2 Replies Latest reply on Oct 30, 2016 5:18 PM by BruceHerbach

    Force relationship between 2 related tables from the master to the detail 1:M

    courdin

      The primary table is "profile" which will only ever have a single profile record

       

      it has a 1:M relationship with Activity table and Nutrition Table

      ( as well as 4 other tables but don't need to discuss them because if we can solve for these 3 tables we can apply the same logic to the other 4)

       

      The Main menu starting form has a menu link to each of the main layouts ( profile setup , and 1 for each of the 6 detail tables)

       

      The Profile layout is typically only visited once during initial setup

       

      Each subsequent use of the app the user would go directly to the Activity layout or the Nutrition Layout

       

      we would like to "auto force" the UniqueID from Profile into the new activity record or the Nutrition layout without the user having to view/navigate through the profile table

       

      Since it will be a mobile app .. screen real estate usage if very critical .. and simplicity for user navigation is a must

        • 1. Re: Force relationship between 2 related tables from the master to the detail 1:M
          philmodjunk

          If there is never going to be more than one record in profile, the value of it's ID seems irrelevant. If so, you can set up your relationships to use the cartesian join operator and it no longer matters what value is entered in your match fields nor even to which fields, the relationship remains valid.

           

          Alternatively, when the file opens, a script can copy the value of the Profile Record's ID into a global variable. The corresponding ID fields in the other records can then be defined to auto-enter the value of this global variable.

          • 2. Re: Force relationship between 2 related tables from the master to the detail 1:M
            BruceHerbach

            You can use the on open script to navigate to the correct layout.  When the mobile app is first opened and the new user puts in their information,  record the ID in a field.  Then when the app opens later,  have it grab the ID and go to the correct layout and find the record you are looking for.

             

            You can use the isempty function to see if the ID field is empty and have it go to the setup screen or the user screen.

             

            HTH