7 Replies Latest reply on Jun 11, 2012 2:07 PM by Willz

    Layout Selector won't work

    Willz

      Title

      Layout Selector won't work

      Post

      Unable to make Global "layout selector" work

      See screen shot - shows layout with selector field open and shows layout selector script steps

      Layout selector field is set to trigger script

      Please advise, Thanks

      Projcest_Screen_shot.jpg

        • 1. Re: Layout Selector won't work
          philmodjunk

          What do you want to happen when a value is selected?

          Your script specifies 5 different layouts, using 5 different layout selector fields, each defined in a different table. Why is is set up that way? You'd only see the last of the 5 layouts each time, the other 4 could be removed from your script and you'd see the same result.

          Which field is formatted with the drop down shown above?

          • 2. Re: Layout Selector won't work
            Willz

            Your question "Which field is formated with drop down shown above"  That is the global layout field - its in each table. And has set script trigger "On Object Modify Trigger | Layout Selection

            Trying to get it to "Go to layout" when selecting one of the names in the drop down "layout selector" field shown

            • 3. Re: Layout Selector won't work
              philmodjunk

              yes, but your script lists 5 different layout selector fields:

              Projects::Layout Selector

              Idea Collection::Layout Selector

              Categories::Layout Selector

              Sub Categories::Layout Selector

              Tasks::Layout Selector

              Which of those is the global field on your layout?

              Why do you have these 5?

              Why do you have 5 go to layout steps where you should have only one?

              • 4. Re: Layout Selector won't work
                Willz

                Yeah doesn't make sense. I'm using FM Starting Point Template "Projects" Im adding several more tables/layouts to this template.

                The Layout Selector is global field in every table/layout that needs the selector dropdown to choose to switch to another layout.

                The global layout selector field triggers the script 

                So the script has to know which word (layout) is selected in the global layout selector dropdown

                Based on the original script from FM Starting Point "Projects" 

                How do I get it work with added tables/layouts?

                • 5. Re: Layout Selector won't work
                  Willz

                  Phill, To answer your question above - "Which field is formatted with the drop down shown above?" The drop down field opened in sample image above is the global "layout selector" field.

                  Re: your other question "What do you want to happen when a value is selected?" select an item from drop down and script takes you to that layout.

                  • 6. Re: Layout Selector won't work
                    philmodjunk

                    Sorry, but "it's the global layout selector field" still doesn't answer my question. As I noted earlier, you appear to have 5 different "global layout selector fields".

                    You should have only one such field. Your script should look something like this:

                    If [PatternCount ( get ( Applicationversion ) ; "iPad" ) ]
                       Go to Layout [Categories::Layout Selector & "| iPad"]
                    Else IF [If [PatternCount ( get ( Applicationversion ) ; "Pro" ) ]
                       Go to Layout [Categories::Layout Selector ]
                    Else
                       Go to Layout [Categories::Layout Selector & "| iPhone"]
                    End IF

                    On your layout, you should double check and make sure that Categories::layout Selector is the field specified for your drop down.

                    These fields should be deleted from your tables:

                    Projects::Layout Selector

                    Idea Collection::Layout Selector

                    Sub Categories::Layout Selector

                    Tasks::Layout Selector

                    I posted the above script so you can compare it to yours and note what steps have been deleted from the original.

                    Here's what I would use:

                    Go to Layout [Categories::Layout Selector & Case ( PatternCount ( get ( Applicationversion ) ; "iPad" ) ; "| iPad"
                                                                                             PatternCount ( get ( Applicationversion ) ; "iPhone" ) ; "| iPhone" )]

                    • 7. Re: Layout Selector won't work
                      Willz

                      I took out the extra layouts leaving only the Projects layout as you said and now it works perfectly.  Thanks Phil!!