4 Replies Latest reply on May 25, 2017 11:46 AM by SteveMartino

    [FMP T-n-T] "Editable" FileMaker Pro Virtual Lists

    eX-Christo

      FMP tip developed by David Thorp, Article written by Andy Persons

       

      *Tested in FileMaker Pro 14-16

      Virtual Lists

      Since FileMaker Pro virtual lists were introduced more than five years go, they have seen wide use due to two primary benefits: flexibility and performance. The whole point of this tip is EDITING values in a virtual list.  That’s new and fancy and most people believed impossible, until now!

      Flexibility

      FileMaker Pro Virtual lists allow us to display information (usually in a portal) in virtually (pun unintended) any configuration we want. We can gather information from a variety of sources and combine them how we wish, without impacting the schema (other than the initial setup of the virtual list structure). Once the structure is in place, we can also reuse it for multiple purposes.

      Performance

      FileMaker Pro Virtual lists have another, sometimes crucial benefit: they can be dramatically faster than retrieving data directly, especially over a remote connection. Because developers control what data is retrieved, they can avoid loading unnecessary data; because they control when it is retrieved, can avoid reloading it unnecessarily. This can result in greatly improved user experiences.

      Limitations

      However, FileMaker Pro virtual lists have a crucial limitation: because they rely on calculations, they cannot be edited directly. This technique allows us to work around this limitation.

      This can be applied to any usage of FileMaker Pro virtual lists. For example, you might wish to quickly retrieve a list of contacts in a popover, while retaining the ability to edit names for quick corrections. Or you could display a list of students with their classes in a cross-tab arrangement, with the ability to change their class assignments on-the-fly.

      Here’s an overview:

      1. Global fields are placed over the virtual fields and set to be hidden except for the active row.
      2. When a user clicks in a virtual field, the value is entered into the corresponding editable field and the focus moved there.
      3. When the user modifies the editable global field, the database is updated.
      4. The virtual list is then refreshed to load the changes.

      screen shot of filemaker pro virtual ists demo file

      The result is that a user can click into the unstored calculation field on the virtual list directly and it will seem like they are directly editing the values.

      Though this technique was developed with FileMaker Pro virtual lists in mind, it could be used any time you want to create the experience of “editing” a calculation field.

      screen shot of filemaker pro virtual lists editing demo file

      Please see the demo file for more details.

      • • • Download Demo File • • •

      ENJOY!


      **This article is provided for free and as-is, use, enjoy, learn, and experiment at your own risk – but have fun! eXcelisys does not offer any free support or free assistance with any of the contents of this blog post. If you would like help or assistance, please consider retaining eXcelisys’ FileMaker Pro consulting & development services.

      About eXcelisys, Inc.: Founded in 2001, eXcelisys (www.excelisys.com)is an FBA Platinum Partner and FileMaker Certified developer organization. eXcelisys specializes in designing, developing, customizing, supporting, consulting, migrating, upgrading, fixing, and integrating of database solutions for Desktop, Mobile, and Web applications. Our core technology competencies are FileMaker Pro, FileMaker Go, and MySQL for database frameworks, along with FileMaker WebDirect, WordPress, MySQL, PHP, CodeIgniter, PostgreSQL, Joomla, Drupal, Magento, CSS, HTML5, and Javascript for web sites and web applications. Aside from providing eXcellent customer service, our goals are to use these technologies to intuitively automate your organization’s data solution needs seamlessly and flawlessly across the web, mobile, and desktop platforms. Contact eXcelisys today for a free estimate and consultation about making your business more efficient through intuitive and effective software automation. 866-592-9235.

      eXcelisys, Inc. is an independent entity and this web site/information/blog post has not been authorized, sponsored, or otherwise affiliated with FileMaker, Inc. FileMaker is a trademark of FileMaker, Inc., registered in the U.S. and other countries.

        • 1. Re: [FMP T-n-T] "Editable" FileMaker Pro Virtual Lists
          SteveMartino

          Another home run.  Very cool again.  I didn't have a chance to really play around with it as much as I would like, but I did have one thought.

          Is it possible when you modify the columns, to keep their original order without selecting 'Reset'? IOW, if I de-select say 4 columns, then reselect 3 (or 4) in any order, could the columns re-appear in their original value list order?

          Just wondering.

          Thanks again for the demo!

          Steve

          • 2. Re: [FMP T-n-T] "Editable" FileMaker Pro Virtual Lists
            eX-Christo

            Steve,

            Appreciate you taking the time to play - and thank you for the kind words! I will toss this suggestion/question back to the author, David Thorp, and reply with his response.

            • 3. Re: [FMP T-n-T] "Editable" FileMaker Pro Virtual Lists
              DavidThorp

              Hi Steve,

               

              Thanks for the feedback.  I'm happy you like the tip! 

               

              The field order is based simply on standard filemaker Value List behavior.  FileMaker checkbox fields are based on Value Lists (which are nothing but return delimited text values), and value lists are constructed in FileMaker by simply adding each newly checked value to the end of the list.  So if you uncheck one that's in the middle of the list, it removes it from there.  Then if you check it again it adds it to the end.

               

              There are a few ways we could change the behavior.  Probably the easiest option would be a field that rebuilds the list in the "Virtual List Fields" field in the order you like using some basic text parsing techniques.  Something like:

               

                   If ( not IsEmpty ( FilterValues ( Globals::VirtualListFields ; "Time Occurred" ) ) ; "Time Occurred¶" ) &

                   If ( not IsEmpty ( FilterValues ( Globals::VirtualListFields ; "UCR Code" ) ) ; "UCR Code¶" ) &

                   If ( not IsEmpty ( FilterValues ( Globals::VirtualListFields ; "Address" ) ) ; "Address¶" ) &

                   ...

                   If ( not IsEmpty ( FilterValues ( Globals::VirtualListFields ; "Longitude" ) ) ; "Longitude¶" )

               

              Then base the "Column Headers" and "Virtual List Data" fields on the above field instead of the "Virtual Lists Fields".

               

              That should do it I think.

               

              Hope that helps!

              David.

              • 4. Re: [FMP T-n-T] "Editable" FileMaker Pro Virtual Lists
                SteveMartino

                Thanks David...I'll give it a whirl