6 Replies Latest reply on Aug 18, 2016 2:22 AM by Stigge

    text field - editeble or not




      Am having a portal, with double click script function on it.. so when i single click i want the user to see the details in another area, but are not editeble.

      But when double clicked i want to make it editeble.

      I know i can use 2 sets of fields, one who is locked to edit and one who isnt.. and then just use show/hide..

      But isnt it possible to do that directly from the scripts ? to change the field entry value. ?

      I also want to change the border colour of these fields when editeble..


      Is that possible ? or do i hafto use the double text field option ?


      Thanks guys =)

        • 1. Re: text field - editeble or not

          In addition to the two-field technique (which can work using a popover as well as Hide), there are a few ways to accomplish this:


          1) Use an OnObjectEnter Script Trigger to test for the right conditions and kick the user to the next field if he doesn't meet them. (In your case, you can override the trigger when the user performs the "edit" action.)


          2) Name the field as an object, then use Go to Object, followed by Go to Field to put the focus in the field. This overrides the "can't edit in Browse mode" behavior.


          3) Use privilege sets to control data entry.


          Whichever method you choose will depend on your exact desired workflow. But you have options.




          • 2. Re: text field - editeble or not
            David Moyer


            I'll add that you can only capture "double-clicks" in iOS (FM Go).  See the OnGestureTap for this.

            (That's double-click, as opposed to click twice.)

            • 3. Re: text field - editeble or not

              It's not impossible to detect double clicks in FileMaker, but it's kinda clunky even when it works. You can capture the time in a variable each time the click performs the script and can then detect the double click by taking the difference between the two time values. (Hmmm, come to think of it, we have a new get function that gets time values of less than a second, that might actually work reasonably well here.)


              I've used a modifier key in the past such as ctrl or shift clicking the field as my method for getting a different result when clicking a button. There's a get function that you can use to detect whether or not a particular modifier key (or combination of keys) are down at the time the script executes.

              • 4. Re: text field - editeble or not

                The function double click is already working.. am using it on my whole project.. so that part isnt the problem.

                The problem is that when i double click i get the details of that portal object on the side.. and making it editeble.

                Normally i solve this by using show/hide between 2 text fields. but there must be a way to modifie the text field by scripting.. unlocking editing / changing colours of the borders..


                But it seems there isnt :/ and that i need to use sets of text fields and using show/hide functions.

                • 5. Re: text field - editeble or not

                  I already gave you additional alternatives. Did none of them suit?

                  • 6. Re: text field - editeble or not

                    Hi Mike


                    well mabye the second option.. going to test it =)  havent had time yet for it =)


                    will get back on that =)