1 2 Previous Next 23 Replies Latest reply on Jun 20, 2017 12:50 PM by TSGal

    Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect

    david_lalonde@d-cogit.ca

      I have a solution that uses Get (ActiveSelectionStart). The solution works without issue on FileMaker Pro Advanced 14.0.4. WebDirect is giving me trouble.

       

      When I use the solution for the first time on WebDirect, the value seems correct. However the same value is always returned afterwards until I upload a the file anew on the server. Then I get a seemingly correct value again the first time… and the same new value the remainder of the time.

       

      FileMaker's documentation indicates Get (ActiveSelectionStart) works in WebDirect for edit fields only. The field is a global text field with repetitions formatted as an edit field with all repetitions displayed horizontally. The field has an onObjectEnter script trigger that launches a script that returns the cursor position using the Get (ActiveSelectionStart) function. The layout that displays the field uses the field's table as its context. The field's table has one record.

       

      Anyone experienced the same issue and found a fix or workaround?

       

      You help is much appreciated in this matter.

        • 1. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
          TSGal

          david_lalonde:

           

          Thank you for your post.

           

          I am unable to replicate the issue.  Here are the steps I took:

           

          1. With FileMaker Pro 14.0.5, I created a database file "TEST.fmp12" with three fields:

            Name (Text)

            Repeat (Text - 10 repetitions)

            GlobalRepeat (Text - 10 repetitions - Global Storage)

           

          2. I created one record with the following information:

            Name = TSGal

            Repeat = One;Two;Three;Four;Five;Six;Seven;Eight;Nine;Ten

            GlobalRepeat = One;Two;Three;Four;Five;Six;Seven;Eight;Nine;Ten

           

          3. I created a Script, "Display ActiveSelectionStart", with the script step:

            Show Custom Dialog [ "ActiveSelectionStart" ; Get (ActiveSelectionStart) ]

           

          4. I tested the script with all three fields and it worked fine.

           

          5. I set the file for Network Sharing and WebDirect.

           

          6. I uploaded the file to FileMaker Server 14.0.4a.

           

          7. Using FileMaker Pro 14.0.5, I opened the hosted file, and the script works for all three fields.

           

          8. I launched Chrome 48 and accessed the file via WebDirect.  The script works on all three fields (and all repetitions).

           

          9. I launched Safari 9.0.3 and accessed the file via WebDirect.  The script works on all three fields (and repetitions).

           

          10. Under Windows 7, I launched Internet Explorer 11 and accessed the file via WebDirect.  The script works on all three fields (and repetitions).

           

          Please let me know what I'm doing differently than you so I can replicate the issue.

           

          TSGal

          FileMaker, Inc.

          • 2. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
            david_lalonde@d-cogit.ca

            Hello,

             

            Attached is a file I made that exhibits the behaviour. All is OK on FileMaker Pro Advanced. I always get 62 on WebDirect, regardless where I click in the fields.

             

            Usernames and passwords are:

                 username: su

                 password: test

                 username: david

                 password: test

             

            Hope this helps!

            • 3. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
              eowen

              I am seeing similar unreliable/unusable information from Get(ActiveSelectionStart) in Web Direct with FM Server 14.0.4.412 and Chrome as the browser under Windows 7.

               

              I am trying to implement something like this:

               

              Live, As-You-Type Search in FileMaker – FileMaker Inspirations

               

              It works fine in the FM Pro client, but on Web Direct the selection start is never accurate, so I have to just reset the cursor to the end of the selection.

               

              There's not a pattern that I can see to what Get(ActiveSelectionStart) returns in Web Direct. Sometimes it's accurate, sometimes it's off by a few, sometimes it is inexplicable.

               

              Would love a workaround or fix.

              • 4. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                eowen

                I have tried playing with the timing, inserting pauses, and that doesn't seem to affect the return value of get(ActiveSelectionStart)

                • 5. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                  david_lalonde@d-cogit.ca

                  Hello,

                   

                  Any progress on this issue? Was the file I produced of any help?

                  • 6. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                    TSGal

                    david_lalonde:

                     

                    My apologies.  I was able to replicate the issue.  I submitted a reply, but obviously, it wasn't posted.

                     

                    In essence, your Get(ActiveSelectionStart) is called during an OnObjectEnter script trigger.  It appears that when the field is entered in WebDirect, the rendering places the cursor at the end of the field, thereby giving you the result of 62 (since the length of each field is 61 characters).  If you run the script again when your cursor is active in the field, the script will then return the correct result.  This issue occurs with Safari, Chrome and Internet Explorer.

                     

                    Since this result is different from FileMaker Pro, I sent a sample file to our Development and Testing departments for review.  I received confirmation today that Testing was able to replicate the issue, and all information has been sent to Development for further review.  When more information becomes available, I will post again.

                     

                    TSGal

                    FileMaker, Inc.

                    • 7. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                      eowen

                      Hi

                       

                      So it seems this is likely to end up classified as bug that might be fixed. Any update? I am not completely blocked by this, but I will need to consider changing my long term strategy if it turns out it won't ever be fixed. Is there any way we can get a sense of whether it is likely to be fixed someday, or not? Not asking for a commitment or a timing, but some basic guidance would help.

                       

                      thanks

                      Ed

                      • 8. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                        TSGal

                        eowen:

                         

                        There is no additional information at this time.

                         

                        I'm not sure what other guidance I can give you than what I said earlier.  It appears the click point is not registered until the OnObjectEnter script trigger completes.  That is why it works if the field is already active.

                         

                        TSGal

                        FileMaker, Inc.

                        • 9. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                          eowen

                          Thanks, TSGal.

                           

                          By "guidance" I meant, in your experience, is this the kind of bug that is likely to get Development's attention and get fixed eventually? Or would it be pretty far down on their to do list? Not likely to be considered at all?

                           

                          I'm new to these forums and FM Pro development, so I don't know generally how responsive FM is, and in particular how much attention WebDirect issues get vs. client or Go issues.

                           

                          You may not have any better picture than I, but like I said, I'm trying to decide which way to go based on whether this feature is usable or not.

                           

                          thanks

                          Ed

                          • 10. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                            TSGal

                            eowen:

                             

                            I cannot provide a clear cut answer.

                             

                            Here is some background that may help...

                             

                            When an issue is confirmed by Testing, the information is then sent to Development where it is categorized and prioritized.  I do not have visibility into this area, but I do know that issues that cause either a crash or loss of data generally receive more attention than perhaps a misspelling in the documentation.  Obviously, my example is an extreme case, but maybe a better way to think of this is an Emergency room and triage.  Someone who arrives by ambulance not breathing will take precedence over someone who walks in with a bad cut.

                             

                            In addition, we have teams of engineers that work on specific parts of the FileMaker code base.  Members of one team may be pulled off to help another team.  In the end, all of the higher priority issues are addressed, but some teams may be left with a few low priority issues, and other teams left with several low priority issues.

                             

                            TSGal

                            FileMaker, Inc.

                            • 11. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                              DickHoning

                              Hi TSGal,

                               

                              I'm also experiencing problems with the Get ( ActiveSelectionStart ) not returning the actual position of the cursor.

                               

                              I've tried SkeletonKey's auto-save option which works fine with Pro and Go but doesn't work with WebDirect.

                               

                              http://www.skeletonkey.com/ios-save-data/

                               

                              Alternatively, you can provide us with another solution to save unstored data when a web direct session is terminated by Filemaker Server.

                               

                              Thanks in advance and best regards - Dick

                              • 12. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                                TSGal

                                DickHoning:

                                 

                                I have attached your post to the original report.  When more information becomes available, I will post again.

                                 

                                If a Web Direct session is terminated by FileMaker Server, any uncommitted data will be lost.  I am curious why Web Direct is terminating from FileMaker Server.  Is there an error code?  Is the Web Direct session timing out?

                                 

                                TSGal

                                FileMaker, Inc.

                                • 13. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                                  DickHoning

                                  TSGal,

                                   

                                  the user is writing a note and stops half way to go and do something else. Before the user can finish writing the note, the session is closed by FileMaker Server. Anything the user typed is lost.

                                   

                                  Skeleton Key's auto-save tric can overcome this problem but unfortunately Get ( ActiveSelectionStart) does not work properly in WebDirect.

                                   

                                  Dick Honing

                                  ECXS / ecOrganizer

                                  • 14. Re: Get (ActiveSelectionStart) Always Returns the Same Value in WebDirect
                                    TSGal

                                    DickHoning:

                                     

                                    This is normal behavior.  In any application, if you enter/change data and the server disconnects, all new data/changes are lost.

                                     

                                    TSGal

                                    FileMaker, Inc.

                                    1 2 Previous Next