6 Replies Latest reply on Apr 16, 2012 5:20 PM by BeatriceBeaubien

    Using FieldBounds on a List View


      First off, this is general Filemaker question, not a question unique to version 12.


      What I'm trying to do is find the location of the upper right corner of a field so that I can have a small window popup just to the right of it. I'm using the FieldBounds function to return the coordinates of the corner which works fine on the FORM view but I'm using a LIST view and it's not working as I'd like apparently because the field occurs many times on the list.


      When I use the FieldBounds function in conjunction with Get( ActiveFieldName ) it returns the location of first occurrence of the field and not the coordinates of the occurrence of field that is actually active.


      Any ideas or other approaches to solving this problem?





        • 1. Re: Using FieldBounds on a List View
          Stephen Huston

          There was once a plug-in for FM which returned the user's cursor x/y coordinates on the screen, but I haven't needed it for years, and don't know if it's still around.


          I am unable to find any FM-native function that will allow for adjusting the position vertically due to the position in a list. (The horizontal can be returned with a combination of Screen Width and Window left postions + fixed object horizontal postion on the layout.) However, placing the new window's height next to the correct row is beyond me in a scrollable window of unknown list length.

          • 2. Re: Using FieldBounds on a List View

            Thanks Stephen! This is more of a nice-to-have than a must-have so I'm going to avoid plugins.  Ultimately if there is no answer I'm going to be fine with that.


            Right now I'm experimenting with multiplying the record number by the height of the body part and adding the result to the result of the FieldBounds function.  It's working pretty well (if there are no summary body parts) but I haven't done any testing with a long list of records so this is far from a proven method.

            • 3. Re: Using FieldBounds on a List View

              put your text on the layout in a field. Make the field height 0 (or 1) and allow "entry". Click something to Go To Field and it should pop down (even in list view).


              if you don't want "entry" (because the cursor will appear in this field...) then make a calculation of the field and display that.




              • 4. Re: Using FieldBounds on a List View

                I'm not sure I follow your method Beverly but fundamentally I'm trying to spawn a new window when the user clicks that field. I'm not just populating that one field, I'm forcing the user to make some other scripted choices as well so it really needs to be window rather than just a single field.


                Everything works fine except that the new window pops up well north of the field they clicked on.

                • 5. Re: Using FieldBounds on a List View

                  Yes. I figured you wanted another window. I just presented an alternative if want to use a field.


                  As you've discovered, you cannot get the "bounds" on the list view.


                  Sorry just putting out ideas. Ignore if it doesn't help.


                  -- sent from my iPhone4 --

                  Beverly Voth


                  • 6. Re: Using FieldBounds on a List View

                    Hi Doug,


                    There is a way to get the top and right coordinates of an active field, even in a list view, however it comes with baggage that may not suit your application. Look at GetLayoutObjectAttribute. The wrinkles are that:

                    • For the function to work, the text field has to be given an object name and you would use Get(ActiveLayoutObjectName), for example

                    GetLayoutObjectAttribute ( Get(ActiveLayoutObjectName) ;"bounds" ).

                    • If you need to do this over many fields it will be a lot of work.

                    • I think you would need to fire this with script triggers, as in my test the calc was refreshing unreliably.


                    I have pasted the GetayoutObjectAttribute bounds details below. Look it up in FileMaker Help.


                    I hope this helps.



                    Best wishes,


                    Beatrice Beaubien, PhD

                    i2eye, Toronto, Canada


                    FileMaker Business Alliance

                    FileMaker 11 Certified Developer

                    Knowledge Translation Certified Professional