1 2 Previous Next 17 Replies Latest reply on Dec 18, 2011 3:02 AM by beverly

    Best method for user editable value lists.

    KylePutzier

      What is the best way to allow users edit their own value list and still allow the developer to update a program by importing the live data into a new version of the file?

      I currently create a table with a field for every value list that requires editing and then point the defined value list at it. The user has a routine that allows them to edit the records in those fields. Is there a better way?

       

      Kyle

        • 1. Re: Best method for user editable value lists.
          reevag

          Kyle,

           

          You can create a value list from values already in the field. No duplicates will be displayed, and you can allow entries that are not in the value list, which will expand it.

           

          HTH

          Reeva

          • 2. Re: Best method for user editable value lists.
            usbc

            Another way is to use a single global field.

            On your setup / pref page you can place as many copies of that field as appropriate and format each to a different value list.

            Because Custom Content value list travel with a clone it's portable.

            I use a OnExit script trigger to clear the global for neatness and I usually limit access to the setup page to managers.

             

            Chuck

            • 3. Re: Best method for user editable value lists.
              KylePutzier

              Often, field values become obsolete and would clutter up the value list.

              • 4. Re: Best method for user editable value lists.
                KylePutzier

                Chuck,

                I dont understand the part about "Because Custom Content value list travel with a clone it's portable."

                 

                I looked at your attachment and it uses standard value list. Any changes made by the user would be lost when I import the old files data into the new file.

                 

                Kyle

                • 5. Re: Best method for user editable value lists.
                  usbc

                  True. Likey we use a different approach for user prefs. I use a seperate file for them.

                  If you have a strictly single file, then this won't work for you unless you start with a clone for mods.

                   

                  As I re-read your original post I see that you use the term "table". Sorry, I should have spotted that.

                   

                  Chuck

                  • 6. Re: Best method for user editable value lists.
                    Stephen Huston

                    Hi Kyle,

                     

                    When I want to control values without fully hard-coding them in the Value List definition itself, I also use a separate table of values.

                     

                    I set it up so value records can be added, but rather than deleting obsolete value records, I use 3 text fields:

                    1. Value
                    2. Included (yes or no, with yes as the auto-enter on creation, eidtable via radio buttons)
                    3. Display_Value

                     

                    Display_Value is an auto-entered  stored value using evaluate triggered on both other fields, so that it populates with Value if Included is "yes"; otherwise it is empty.

                     

                    The Value List is then defined in that file to show all values from the Display_Value field. It can then be used throughout the system.

                     

                    This allows turning Values on and off in the list without dleting the records of values which have been used.

                     

                    Stephen Huston

                    • 7. Re: Best method for user editable value lists.
                      mrwatson-gbs

                      I use a method with two tables. The method is approximately like this:

                       

                      Table VL stores the id and name of the custom value list

                      Table VLValues stores the value list entries.

                       

                      The VLValues table has a Code and a Text field, which are typically used for the first and second columns of a two column value list, but can also be used singly.

                       

                      The value list data can be entered on a layout based on the VL table with a create-relation portal to the VLValues table.

                       

                      The clever bit is that in the VLValues table you define extra columns for each value list:

                       

                      _f_VL1_Code = Case( _fk_VL = 1 ; Code )

                      _f_VL1_Text = Case( _fk_VL = 1 ; Text )

                      _f_VL2_Code = Case( _fk_VL = 2 ; Code )

                      _f_VL2_Text = Case( _fk_VL = 2 ; Text )

                      _f_VL3_Code = Case( _fk_VL = 3 ; Code )

                      _f_VL3_Text = Case( _fk_VL = 3 ; Text )

                      etc.

                       

                      You then define your value lists based on these extra columns.

                       

                      Value list "shipping" based on fields ( _f_VL1_Code, _f_VL1_Text )

                      Value list "title" based on fields ( _f_VL2_Code, _f_VL2_Text )

                      Value list "gender" based on fields ( _f_VL3_Code )

                      etc.

                       

                      In this way you can create many custom value lists using two tables, two TOs, one input layout and a bunch of extra calculated fields. Using this method you don't need extra TOs in your relations graph for each value list...unless of course you need related values.

                       

                      All in all I find the overhead of this method minimal in comparison to one table per value list. Especially if you have an update process for new releases of your software in which each table must be cleared and reimported.

                       

                      The method is quite flexible, and you can add varoius functionality to the model, such as:

                       

                      • you can create double or single column value lists,
                      • you can add general meta-info fields to the VLValues table, like a rgb-colour field, an icon field, a group field for dependent value lists
                      • you could support sorting by number by adding a flag field to indicate that the value is a number value instead of a text value

                       

                      I hope these ideas help.

                       

                      Happy programming.

                       

                      Russell Watson

                      • 8. Re: Best method for user editable value lists.
                        mrwatson-gbs

                        If you have a "customer print file", in which you have customized print-layouts, which is either not updated when a new version of the software is released, or has to be recustomized anyway, then it could sensible to do the following:

                         

                        • instead of spattering you multi-file database solution with user-editable value lists (which are a headache to locate and reenter every time you deliver a new version)...
                        • place ALL of your customer-editable value list in the one file and define the equivalent value lists in your solution files to refer to these editable lists in the customized file.

                         

                        This method has 3 major benefits over the fully fledged solution I refered to above:

                         

                        1. You don't have to change your existing database very much,
                        2. ALL the layouts and value lists that you have to customise are in one place, so recustomizing is relatively easy
                        3. The value lists are 'real' value lists and can thus have a fully freely definable sort order (which under FM11 is quite valuable, seeing as you can no longer use the keyboard to skip to the value you wish to enter)

                         

                        Of course the one disadvantage of this solution is that you can't automate the update process, as you can with the first solution above. Here you DO have to reenter the value lists, if you deliver a new version. This is probably the best solution if you rarely update your software.

                         

                        Once again, happy progging!

                        • 9. Re: Best method for user editable value lists.
                          KylePutzier

                          Russell,

                          As mentioed in my original post, I use a single table where each field (column) is a value list and each record is a value. Then I create a standard FileMaker value list and set it to "Use values from field...". If I'm already in the file where the value list table is, no TO's are needed. If I'm in a different file, then I create a TO that points to the file where the value list table is. Metadata could be added I suppose.

                           

                          I like simple. My way seems to be the most simple I've found so far.

                           

                          I do appriciate everyones input.

                           

                          Kye

                          • 10. Re: Best method for user editable value lists.
                            KylePutzier

                            Russell,

                             

                            #3 is an issue with the way I do it now. I'm not sure why FileMaker sorts the values. Wish it didn't (or make it an option like portals)

                             

                            Kyle

                            • 11. Re: Best method for user editable value lists.
                              reevag

                              Kyle,

                               

                              I typically use a "code" file with fields: code, description, "how to handle this code", and a sort field (numeric)   - and use these as value lists.

                              This allows users to define their own "codes" that are meaningful to them, give them a description, and place them in the list where they want them.

                               

                              Perhaps you can adapt this.  In other words, the method you're using is probably the best, tho you might want to add a field for sorting the values (allow decimals for value insertion)

                               

                              Reeva

                              • 12. Re: Best method for user editable value lists.
                                Mike_Mitchell

                                As an alternative to a pure value list, you can have the system throw up a separate window in List View. This allows you to sort in any order you wish, and the user can then click the item he wants. You can incorporate a filtering field at the top, should that be valuable. I've found this useful when the value list becomes long.

                                 

                                Mike

                                • 13. Re: Best method for user editable value lists.
                                  RayCologon

                                  Mike_Mitchell wrote:

                                  As an alternative to a pure value list, you can have the system throw up a separate window in List View. This allows you to sort in any order you wish, and the user can then click the item he wants. You can incorporate a filtering field at the top, should that be valuable. I've found this useful when the value list becomes long.

                                   

                                  Hi Mike,

                                   

                                  I agree that that approach can work really well. Sorting options aside, the ability to add filtering, as you say, takes it to a different level, and should really be considered essential for lists longer that a dozen or two items at most.

                                   

                                  Regards,

                                  Ray

                                  ------------------------------------------------

                                  R J Cologon, Ph.D.

                                  FileMaker Certified Developer

                                  Author, FileMaker Pro 10 Bible

                                  NightWing Enterprises, Melbourne, Australia

                                  http://www.nightwingenterprises.com

                                  ------------------------------------------------

                                  • 14. Re: Best method for user editable value lists.
                                    KylePutzier

                                    That is pretty much the way I do it also. I try to not let value list get long. Below is my standard "Choose" style dialog. It allows for column sorting, filtering, multiple selections, etc. Users seems to be able to intuitively understand it. Most of my form view layouts also have a list view layout that is similar to this.

                                     

                                    Kyle

                                     

                                    Screen shot 2011-12-15 at 9.45.09 AM.png

                                    1 2 Previous Next