5 Replies Latest reply on Oct 28, 2013 1:54 PM by IT_User

    List of value and table multi-values

    fc60

      Hello,

      I have a table with some codes and descriptions ==> Id; code_group; code_item; des_item

       

      Exemple:

       

      IdGroupCodeDescription
      01ROLEPROGProgrammer
      02ROLEANAAnalyst
      03ROLEPMProject Manager
      04COMPGMGeneral Motors
      05COMPBOSBosch
      06COMPWALWalmart

       

       

      To make a relationship between this table and an other table is not a problem, I use the ID, but I want to create a list of values for a combo box only with id and des_item for the group that I want use in the module (For exemple a combo box for the roles of a resource).

      Many tanks for the help.

      PS: I also accept other types of solution, but with other database I always used this system. I dont like have a table for each code_group.


        • 1. Re: List of value and table multi-values
          MichaelManousos

          Uou just need a self join relationship and a global field. In the global field you pick the group and then you use a value list with show only related records

          1 of 1 people found this helpful
          • 2. Re: List of value and table multi-values
            fc60

            Thank you for your answer Michael, I think have understand, but I have still some problems.

             

            • I create an alias with my T1 (alias name= T2).
            • The alias T2 is joined with the table that contains a global field (value = “ROLE”) on the field group.
            • I create a value list with “use values from first field” and “Also display values from second field”. Tables used T1.
            • I select option filed for “Include only related values starting from:” T2.
            • I click the join (“Edit relationship”) between T1 and T2 and I click “Allow creation of records in this table via this relationship” on the left table (T1)

             

            I don't see values…

             

            Thanks

            • 3. Re: List of value and table multi-values
              IT_User

              Please explain the relationship from T1 to T2, again.

              From what it seems to me you have a global field you are using in T1 to relation to the Group field in T2.  Then you have a value list based on T1 (from T2), which should probably be based on T2 (from T1), since T1 has the relationship side of using the global field.  (Otherwise, you might get all or no values.)

              Which layout are you trying to get the values on? The one based on T1 or T2?

               

              The "Allow creation of records in this table via this relationship” should not affect your value list.

               

              You will probably also need a value list to choose the specific group on the global field, to filter your other value list (unless you assign it another way).

              • 4. Re: List of value and table multi-values
                fc60

                In T1 I don't have the global filed. T1 is ==> Id; code_group; code_item; des_item

                From T1 (table) to T2 (Alias) I have a join on ID.

                From T2 to GLOBAL_VARIABLES_TABLE I have a join on T2.code_group and GLOBAL_VARIABLES_TABLE.Field_that_contain_value (Field_that_contain_value = ROLE. I think to use one global field for each T2.code_group to filter)

                 


                • 5. Re: List of value and table multi-values
                  IT_User

                  I believe you would need the global field in T1 (T2) to use in the self join, which I think is what MichaelManousos maybe have been talking about.  The relationshipn being T1::globalField to T2:groupField

                   

                  Then you would create the value list based on T2, from T1.  On T1 you can change the group, and then that would filter the value list that is based on T2.

                   

                  (Or if you want the value list based on T1, just switch all the T#'s, I had mentioned above, to the other one.)

                   

                  That way you wouldn't even need a Global Variables table.

                   

                  The way you have it set up may only show about 1 value, and that is when T1::Id=T2::Id.