1 Reply Latest reply on Feb 28, 2012 6:23 AM by $Nith$

    Copying actions to another cell in a table

    Mary-Anne.R

      Hi,

      I have set up a table and in the first cell created several actions using the action builder (for example if XYZ is entered change the colour to grey, if ABC is entered change the colour to red). I want to copy and paste this field to a number of cells in the table however the actions refer to the original cell...is there a way to have it copy the actions but reference the cell it is pasted in to?

      Hope this makes sense!!

        • 1. Re: Copying actions to another cell in a table
          $Nith$ Level 4

          this keyword refers to the current object in the scripting model.

           

          a typical syntax would be as follows..

          if(this.rawValue == "XYZ")

          {

               this.border.fill.color.value = "255,0,0";

          }else if(this.rawValue == "ABC")

          {

               this.border.fill.color.value = "255,255,0";   

          }

           

          Since the code uses a relative reference (this), you can copy the field on all cells of the table. No need to change anything on the code.

           

          Nith