3 Replies Latest reply on Nov 28, 2011 3:57 PM by robdownunder

    change associated table for layout by script ?

    robdownunder

      Title

      change associated table for layout by script ?

      Post

      I'd like to change the associated table for a layout via a script step.

      Is this possible ?

      I can manually switch between two tables via "Manage Layouts", but would like to automate this.

      thanks.

        • 1. Re: change associated table for layout by script ?
          LaRetta_1

          "I'd like to change the associated table for a layout via a script step."

          Hi Rob,

          No you can't and it is because layouts are tied to (and based upon) a specific table occurrence of a table.  If you wish, you can use script to switch to another layout which may be identical to first but based upon a different table.  See Go To Layout[] script step.  With it, you can switch to any other layout even if based upon other table occurrences and other tables.

          • 2. Re: change associated table for layout by script ?
            philmodjunk

            I can manually switch between two tables via "Manage Layouts",

            Not necessarily. The fields you place on the layout refer to specific table occurrences and fields. Specifying a different table occurrence in Manage | Layouts or in Layout Setup could easily fill your layout with "missing" tags and even if not, data from related tables will not be accessed from the context of your newly specified table occurrence and this could produce some very unexpected suprises for you even when making the change manually. This is not to say you shouldn't make such a manual change, but do so with caution and take a careful look at your relationship graph to evaluate the consequences of such a change.

            • 3. Re: change associated table for layout by script ?
              robdownunder

              I know what you mean Phil, however the layout makes no direct reference at all the the two tables. All content on the layout is for related tables that the two main tables both share.  The two main tables had only a key field.

              Anyhoo, I've given up on that idea since I cannot automate it.