7 Replies Latest reply on Jul 7, 2014 4:26 AM by user19752

    go to field doesn't work all the time?

    tonymak

      I have two layouts, one is a modified copy of the first.

      on these layouts i have several popovers. one seems to not play nice.

      the problem popover does this:

      it contains two fields input fields (from current table).

      these are to gather a widht and height input for an ordered object.

      the steps to the issue:

      button is pressed to open popover.

      when popover opens i have a script trigger to go to field(Select/perform) to make the width field in focus.

      user enters an integer say 24

      then to add a fraction (Decimal) i have them press one of 7 buttons 1/8, 1/4. 3/8 etc.

      pressing a fraction button a script is run to add the appropriate decimal to the integer in the width field.

      the final script step in the fractional button is a go to field(Select/perform) to go bring the height field in focus. (it is in the same popover).

       

      on the oroginally created layout the routine works flawless. the focus goes from width to height, then after selecting the fractional button for the height field the popup is closed and the exit script on the popover triggers a script to check that the entries are within the products scecifications.

       

      however in the layout that was created by duplicating the original, some modifications made (The two scripts are used for different things)

      the popover action is really strange,

      after inputing the width, then pressing the fraction button, instead of going to the height field the popover closes.

      it uses the same script as the original, the width and height fields are of the same table as the original layout. the script triggers are setup the same. but the duplicated layout acts as if the height field is not present on the layout so the go to fails as if the script is looking for the field but can't find it.

       

      i've tried everything remove re-add in the height width fields on the layout rewrite the scripts, used seperate scripts even, the duplicated layout just seemd to rfuse to belive there is a height field on it to go to. oh and i also removed the height field from the popup and placed it on the main layout and still nothing the height will not be brought to focus.

       

      i have this same issue on other layouts also where i have only a width field in a popover with go to field in entry triggr, on original layout the routine runs perfect, but on the duplcated layout imediatly when pressin the popover button it opens a small amount and instantly closes, removing the go to field trigger all is happy in the worlkd except of course my width field isn't in focus.

       

      has anyone seen this and found a work around? it's almost as if somhow filemaker is thinking on the duplicate layout the height field doesn't exist or maybe thinks it need to be finding the height on the original layout without a goto layout script step. it seems to always happen on duplicating a layout.

       

      this action works the same using it on a mac book pro using filemaker pro advanced or a ipad using go

        • 1. Re: go to field doesn't work all the time?
          taylorsharpe

          I would look at tab orders and then also at permissiosn to make sure you have access to go to the field.  But I suspect your tab orders are really what is throwing you off.  Step through with the debugger and watch what is happening with the focus. 

          • 2. Re: go to field doesn't work all the time?
            tonymak

            I will check that, but doesn't go to field ovrride tab order?

            • 3. Re: go to field doesn't work all the time?
              tonymak

              tryed tab order, didn't make any difference. the debugger shows the steps correctly, indicates the height field, but dosn't bring it into focus, the script just continues to the exit script of the popover. the permissions are all still set as admin, if they were different then the focus wouldn't work on any layout corrct? the focus works fine still on the original layout, only on the duplicated layout does it not functiion properly.

               

              this is the script on the fractional buttons. nothing strange or funky.

               

              Confirmations: Add Width Fractions Confirmation Combo Box

              Set Variable [ $sp; Value:Get ( ScriptParameter ) ]

              #

              Set Field [ Estimate Data::Conf_Width; Int(Estimate Data::Conf_Width)+$sp ]

              #

              #

              #Enable next line to automatically go to Height field

              Go to Field [ Estimate Data::Conf_Height ] [ Select/perform ]

               

              • 4. Re: go to field doesn't work all the time?
                tonymak

                I added a screen shot of the layout in question showing the popover.

                • 5. Re: go to field doesn't work all the time?
                  user19752

                  Is this resolved ?

                   

                  I guess there is another instance of Conf_Height field on the layout.

                  You seems to have FMPAdvanced, if so make database design report and check it.

                  Or see FieldNames(Get(FileName);Get(LayoutName))

                  • 6. Re: go to field doesn't work all the time?
                    tonymak

                    Thanks For the reply,

                    No it was never resolved.

                    My initial thought was also that the fields where duplicated, I did check the Database report showed the filed only on the layout once, also I removed the fields and save, re-ran the report and didn't show even once.

                     

                    I just tried your tip and it also shows no duplicates, the only way i could find to make my layouts work for me was to remove the "Width" and "Height" fields from the duplicated layouts (Different names not same name in different folders), then add "Width_Fix" and "Height_Fix" use those two fields and have them set fields "Width" "Height" equal to them via script when layout exited. A pain, but worked.

                     

                    Really strange, it really does seem that FM thinks the copied layouts are still the original and somehow thinks it needs to go to those fields on the original layouts, not the current one. the original layout works great still, only the copied ones have the issue

                    • 7. Re: go to field doesn't work all the time?
                      user19752

                      Hmm, last one thing I can say is

                      compare the result of FieldBounds(Get(FileName);Get(LayoutName);"Conf_Height") to the value of the field you want to go on inspector.

                       

                      Did you repair the file?