5 Replies Latest reply on Mar 18, 2015 7:09 AM by siplus

    Large text field viewing position

    scodoc

      I have a text field that can approach a megabyte.

       

      When viewing on a form, with scroll enabled, is there a way to know the starting position within the field that is being viewed?

       

      If the user clicks within the field, the cursor goes to that position and can be read with Get(ActiveSelectionStart). But if the user simply scrolls down, I want to know where within that large text field the user is viewing without requiring them to click in the field.

        • 1. Re: Large text field viewing position
          taylorsharpe

          Yes... I can relate to this problem and I was never able to solve it with standard FileMaker tools.  If you must solve it, you have to do something like export the field and use a web portal and then use javascript/PHP in the web page to do such manipulations.  It would be a real pain to do.  And I'm sure you could also do something with ScriptMaster and Groovy (version of Java programming language).  Those are the only ways I can think off hand other than hiring a plugin developer to make a custom plugin for you. 

          • 2. Re: Large text field viewing position
            keywords

            This is not something I'd ever thought about, but a quick test shows the following:

             

            1.     Text field with a scrollbar: when you select the scrollbar and start scrolling, by default the cursor goes to the end of the text contents. Therefore Get ( ActiveSelectionStart ) will give you the total character count of the text in the field. If you do nothing but scroll the cursor position remains the same. Therefore the answer is NO, I guess.

             

            2.     Remove scrollbar from the text field: When you click anywhere inside the field the field enlarges to the limit of its containing window to show as much of its content as possible. Now the only way to make the window scroll is to move the cursor; when the cursor reaches the last visible line it will open up move the text up to show the next line. Moving through the field using the down arrow makes a tolerable task of reading the text. Because it is tracking the cursor, Get ( ActiveSelectionStart ) will tell you where the reader is up to. That's not really what you want, since they must click into the field and then move the cursor though it to reveal its contents. Could be a workaround though. It depends what you are trying to achieve.

            • 3. Re: Large text field viewing position
              user19752

              I feel 'megabyte' text is not usable since entering/exiting the field takes about a minute.

              Do you really want to the text into a field of a record ?

              • 4. Re: Large text field viewing position
                scodoc

                That field is the RAW data dump from a piece of research equipment that is being parsed. It contains a scramble of id fields and data. As the data is for research, we are looking for special cases of interest that we extract for further analysis. We have no control over what we get other than capture it all, extract what we we find interesting, archive the rest.

                 

                A whole other world exists other than writing facebook/twitter/accounting/phone book/calendar/invoicing/inventory spplications.

                 

                By the way. I find Filemaker 13 scripts to run noticeably, often painfully slow. Looping character processing is pathetic to the point I am writing C language routines and hooking into the program. A simple loop with just a few if/case type statements using Middle to extract characters is absurdly slow compared with a C program with direct subscripting. A thousand character field in Filemaker takes a couple seconds (let alone multiple minutes for a 60k field). The identical routine written in C using the Send Event script step processes in a blink.

                • 5. Re: Large text field viewing position
                  siplus

                  scodoc wrote:

                   

                  I have a text field that can approach a megabyte.

                   

                  When viewing on a form, with scroll enabled, is there a way to know the starting position within the field that is being viewed? .... if the user simply scrolls down, I want to know where within that large text field the user is viewing without requiring them to click in the field.

                   

                  May I ask what would be your next step, once you've had that piece of information ?