1 2 Previous Next 20 Replies Latest reply on Feb 7, 2013 12:35 AM by willrollo

    Seed code


      Seed code


           I am having issues with implementing the back magic feature of Seedcode. I know this is probably quite a simple question, but I assume this can be used for different layouts and not just tabs as the detailed instructions point out? I only want to really go back on page as it were so that the user can check something and return to where he started. Is seedcode to complicated for this? I did take a look at prev posts on this topic but still am a little confused on how to design the feature and implement it,

           Many thanks

        • 1. Re: Seed code

               It should work, but is probably overkill if you never want to go back more than one layout.

               The OnLayoutExit Script trigger can perform a script that updates a global variable with the name or number of the layout you are exiting. A button can use go to layout with the layout name or layout number calculation option to go to the layout name or number recorded in that global variable.

          • 2. Re: Seed code

                 Hmm. I understand most of that but feel a little more detail would be helpful! Could you provide a quick example fof the scripts required?

                 So my 'back button' has a script triggered on the OnLayoutExit trigger that contains a set global field with mycurrent layout name. But when I click this button, how does it know what layout to go to? Or are there two global fields? A little confused!

                 Thank you very much


            • 3. Re: Seed code

                   Note, this only lets you flip back and forth between a pair of layouts:

                   Use the OnLayoutExit trigger to do this:

                   Set Variable [$$Layout ; value: get ( LayoutName ) ]

                   Use the button to do this:

                   Go to Layout [$$Layout]

              • 4. Re: Seed code

                     I think I may have to use the seedcode solution then - Have you used it before? Can it be used for different layouts or just tabs?


                • 5. Re: Seed code

                       In that case, I think I may have to follow the seed code route. Can it be used for different layouts or just tabs? Have you used it before as I find the instructions rather confusing...


                  • 6. Re: Seed code

                         I have not used the SeedCode solution.

                         You indicated:


                              I only want to really go back one page

                         What I suggested does exactly that, it goes back one layout and only one layout.

                         What else do you need this to do?


                    • 7. Re: Seed code

                           Well, I thougt that if the user is on a layout that has options to directly go to many other layouts, then there would have to be a link on every layout...

                           So, in your solution, you can go to any layout from the original layout and then go back to the original layout? If so, then sorry, I misunderstood

                      • 8. Re: Seed code

                             You should be able to use the above method in your database. Make sure to put the OnLayoutExit script trigger in place on every layout to which you might go.

                             What I meant by "this only allows you to click back and forth between two layouts" is that the global variable only stores a single layout name or number. It can't let you go from layout A to layout B to Layout C and then retrace your steps back to Layout A. Plus, if you put the script trigger on every layout, the go to layout step will also trip the script trigger updating the global variable even as the script returns you to the previous layout. So if you navigate from Layout A to Layout B, when you click the back button, you end up on Layout A and if you then click Back on layout A, you end up back on Layout B--thus resulting in "flipping back and forth between two layouts". But if you use other means, such as a different button to navigate to Layout C, this method still allows you to click ack on Layout C to return to the previous layout.

                        • 9. Re: Seed code

                               Got it...I understand and have the globals working, Although the button I have created that uses the go to layout $$Layout script doesnt do anything. But the variable does display the correct layout name it is targetting.

                               Any thoughts? Thank you


                          • 10. Re: Seed code

                                 Make sure that you have perfectly spelled the variable's name in the Go To Layout step.

                                 Make sure that you have selected the "layout name by calculation" an not the "layout number by calculation" option for your go to layout step.

                            • 11. Re: Seed code

                                   Yup - checked that...Not sure why it doesnt work, Sure it is something simple..

                                   Just to confirm.

                                   I have created a script called 'back',

                                   I have added this to two layouts, 'quote list' and 'customer list', by using the OnLayoutExit script trigger in layout set up.

                                   Script is :

                                   Set Variable $$Layout

                                   Value - Get(layoutname)

                                   I have created a button on each of the two layouts that when pressed, go to layout by calc name, $$Layout


                                   I have added a merge variable on the two layouts so I can see what value is being entered by the script. So when I am looking at the Customer list layout, it shows "Quote List" and vice versa


                                   Hope this helps you to see where I may have gone wrong...

                              • 12. Re: Seed code

                                     You need TWO scripts.

                                     Enter layout mode for your layout and select Layout Setup...

                                     Click the script triggers tab.

                                     Select OnLayoutExit as the script trigger

                                     select a script that does this:

                                     Set variable [$$Layout ; value: Get ( LayoutName ) ]

                                     Click Ok until you are back on the layout.

                                     Use the button tool to add your back button. Set it to perform this script or script step:

                                     Go To Layout [$$Layout]

                                     Repeat this for every layout where you want to use the back button.

                                • 13. Re: Seed code

                                       Sorry - My fault for not explaing properly - I had done exactly as you have instructed.

                                  • 14. Re: Seed code

                                         If so, it would work. Better check the details.

                                    1 2 Previous Next