4 Replies Latest reply on Feb 9, 2016 3:19 PM by beverly

    go to record


      hi all, i am new to FM and have version 14.


      i have three layouts - a home screen with buttons to two layouts (business addresses and quotes)


      what i would like to do is have a drop down menu on the home screen that i drop down to select a business name and that takes me to that specific record and in the business address layout


      i have tried the go to related record but it just seems to skip to the the last viewed record, do i need to have a relationship set up, or is it a straight forward script to jump to that record and layout?




        • 1. Re: go to record

          Hi Jamie - welcome to FM and the community.  I'm making a couple of assumptions here:

          1.  If your 'home screen' is based on a separate table (eg. menu) and if your dropdown is attached to a global field in the 'menu' table ...


          Then you need a relationship between the 'menu' table occurrence and the 'business addresses' table occurrence - with the global field to the business name as the predicate in the relationship - see screenshot.

          2016-02-10 09_42_49-Edit Relationship.png

          HTH.  Chris

          • 2. Re: go to record

            Which table is the home screen layout based on?

            Which table is the business Address based on?

            I assume you mean have a field, that's a drop down, tied to a value list of business addresses.

            What you would want is a trigger, OnObjectModify, for one, that grabs the value and either goes to the related record, if the 2 layouts are related, or grabs the value and sets a variable, goes to the addresses layout, enter find mode, set the proper field to the variable, Perform Find

            • 3. Re: go to record

              hi guys


              thanks for v quick response, i am not sure i follow, i have attached some images,


              do i need a new table relating to the home screen with a field linking a relationship to the business name?


              excuse my test data typing in the imagesbusiness adrress.tiffhome.pngrelation.tifftables.tiff

              • 4. Re: go to record

                I believe you mean you have a drop down (no relationship required). IF it's a global field then it can work for any method, any user.


                I would create a TRIGGER for the field.




                probably OnObjectModify



                Then when you change the value in the field by drop-down, the script is called.


                something like this:

                set variable ($myVar ; table::global_field) // store the value in the select drop-down

                enter find mode

                go to layout (.... wherever you need to find the record )

                set field (table::searchfield ; $myVar ) // transfer the stored value to the field in find mode

                perform find

                sort (... if desired)

                exit script


                You can trap for nothing found or ...


                You are searching for the value in the table/layout/report and then displaying.

                does that help?