5 Replies Latest reply on Nov 7, 2007 4:34 PM by (WollombiWombat)

    Create table field (not record) using ADDT software


      I wondered if anyone can give me detailed help on how to create a table field on-the-fly instead of creating records, using ADDT software.

      For Example:

      I have two tables.

      One table holds language names and codes, ie Australia and AU for the shortened code.

      The other table holds country descriptions, but each table field is the shortened country code (in this case AU)

      So what I want to do, is when I add a new language in the admin (ie, France) then it will create france in table 1, and also create the table field FR in table 2.

      I am not up on programming, so if anyone can detail as much as possible, you will be saving my bacon here.

      Many thanks
        • 1. Re: Create table field (not record) using ADDT software
          Level 1
          Sounds like what you need is a "foreign key" in the detail table that points to the id of the country in the country table.

          ADDT is perfect for this even if the documetation (and this klunky forum) is now third class.

          I suggest that you read this http://help.adobe.com/en_US/Dreamweaver/9.0_ADDT/help.html?content=MXK3_052000_MX_K3_cont rol_panel.htm
          Make special note of Step 2, item 5, second bullet point.
          (Note item 4 demonstrates the point about pathetic documentation)

          This would be applicable to your Detail Table that needs to have its foreign key pointing to the id of the country table.

          For example, consider two tables with these fields:

          id_cou (the record ID)
          name_cou (the name of the country)
          isocode_cou (the ISO code for the country eg: AU for OZ)

          id_det (the record ID)
          idcou_det (the foreign key which is the ID in the Countries table - so this is an interger field - not a text field)
          detailfield1_det (some detail info)
          detailfield2_det (some more detail info)

          So in the Dynamic LIst Wizard for the Details list you make sure that the foreign key points to the primary key of the Countries record.

          Now, here is the neat thing: When you get to creating the form for the Details table the foreign key gets displayed as a menu showing the actual names of the countries listed in the countries table.

          Experiment with that and see how you go.
          • 2. Re: Create table field (not record) using ADDT software
            Level 1
            Hi WollombiWombat,

            Many thanks for that reply. Its nice to know that there are still people out there who will go more than necessary to help people here. Cheers.

            However, I think I might not of made myself clear. My problem is that, you know when you create tables, you set up fields that hold the information? Well its these fields that I want to create in the 'language text table', when I insert a record in the 'language table'.

            So, when I create say, Polish language in the 'language table' and insert the info - with the normal id, lang_name, and lang_code. I also want to insert the lang_code as a field (and not a record) into the 'language text table' - I'm not sure if it has something to do with the ALTER coding in mysql.

            Appreciate your help

            R, Mark
            • 3. Re: Create table field (not record) using ADDT software
              Level 1
              Hi Mark
              Thanks for the comments. Not sure I understand why you would want to add a field to the Language Text table. Can you explain the application a little more ? What are you wanting to achieve from the user's perspective ?
              • 4. Re: Create table field (not record) using ADDT software
                Level 1
                Hi Wollo,

                been away for a while, apols for not replying.

                In this time the client has changed their minds, so my approach has changed, but many thanks for taking time to help me. Appreciate it.

                R, Mark