3 Replies Latest reply on Mar 26, 2012 2:51 PM by philmodjunk

    Go To Layout Name by calculation

    TimothyNees

      Title

      Go To Layout Name by calculation

      Post

      Any help setting up a calculation would be appreciated.  I created a value list and each item in the value list has a layout with the same name.  what should a calculation look like in order for me to choose a layout based on the contents of the field using the value list.

      ive tried just selecting the field name in the caluclation box but it never works when I run the script.  i must need more syntax to make this work but I can't find anything the the FM help to tell me how to make the calculation.

        • 1. Re: Go To Layout Name by calculation
          philmodjunk

          What you tried should work, provided the name selected from your value list exactly matches the name given to your layout and this assumes that you don't then rename your layout to be something different.

          • 2. Re: Go To Layout Name by calculation
            TimothyNees

            you are correct it does work. For reasons I can't figure out I had to completely rewrite all of my scripts pertaining to this action.  The good news is my scripts which call the appropriate report got alot shorter. Instead of performing complex calculations to determine what report to use all I need is a layout for each report and I can now call it by name based on a field in each record. 

            I originally when trying out the Go To Layout Name by Calculation simply changed the Go To in one of my scripts from a specific name to a calculation and it kept using a layout which is not even related to the search.  I still don't know why it didn't work when I did that but at least it all does what I need now.  Amazing how we sometimes over complicate things only to find a much easier way after the fact.

            • 3. Re: Go To Layout Name by calculation
              philmodjunk

              If you posted this also in Report an Issue, please read my response there. The person who posted there had a calculation that was not correctly returning the layout name, but was also getting an extra return tacked on the end of the text...