3 Replies Latest reply on Oct 14, 2008 11:26 PM by Günter Schenk

    Update Record Wizard, tng_Recordset and Primary Key

      Hi - trying to make an image gallery that allows the user to add captions to each image displayed in a loop without having to send the user to a different form/detail page.

      My question is - can the tng_recordset generated by the Update Record Wizard be modified to use a field of another recordset on the same page as it's primary key?

      I.e. (on the Update Record behaviour) - Primary Key = Entered Value = {imagegalleries.galleryimages}

      this doesn't work, but it's where I'd like to be...

      The recordset 'imagegalleries' has been filtered using a URL variable that was defined as the gallery being edited.

      Hope this makes sense - have been trying for days on this.

      Dan
        • 1. Re: Update Record Wizard, tng_Recordset and Primary Key
          Günter Schenk Level 4
          Hi Dan,

          --------
          I.e. (on the Update Record behaviour) - Primary Key = Entered Value = {imagegalleries.galleryimages}

          this doesn't work, but it's where I'd like to be
          --------

          maybe this just doesn´t work, because ADDT´s "dynamic data" format {whatever_transaction_value} can´t be recognized in this very context. Did you try with using native PHP syntax like $row_queryname['columname'] ?

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: Update Record Wizard, tng_Recordset and Primary Key
            Level 1
            nope - no joy. here is the primary key line from the behaviour:

            $upd_boomcms_galleries_files->setPrimaryKey("bcms_galleryimage_id", "NUMERIC_TYPE", "VALUE", "$row_galleryimagelist['bcms_galleryimage_id']");

            I just get a blank page.

            :(
            • 3. Re: Update Record Wizard, tng_Recordset and Primary Key
              Günter Schenk Level 4
              -------
              I just get a blank page
              -------

              this means you´re having a PHP syntax error somewhere, and I´d recommend to always activate PHP error reporting at least on your local development server to have PHP indicate the reason why things aren´t working.

              However, when using such native PHP syntax within this context, you´ll usually need to add some more stuff around the variable -- means:

              $upd_boomcms_galleries_files->setPrimaryKey("bcms_galleryimage_id", "NUMERIC_TYPE", "VALUE", "".$row_galleryimagelist['bcms_galleryimage_id']."");

              works better now ?

              Cheers,
              Günter Schenk
              Adobe Community Expert, Dreamweaver