5 Replies Latest reply on Apr 28, 2014 3:47 PM by MorkAfur

    Another Drop Down Question

    MorkAfur

      Title

      Another Drop Down Question

      Post


           I have a customer table linked to a zip code table on zipcode. If I setup a portal for zip code, then enter the zip code in the customer table, I'll see the matching cities in the portal for that zip code.

           What I was hoping would be a simple extension on this doesn't appear to be that simple.

           Specifically, I'd like to use the portal's cities found for the matching zip code as a drop down that auto-populates when the user selects the zip code. This is clearly a contrived example, but I don't see how to make this work.

           I just want a selection drop down, not something that would modify a field.

           Based on other forum posts, this probably involves a global field, but I'm not sure why it's not easier to just create the list without these extra hacks. I suppose it's because all fields are bound to ... something and can't just be used as "pickers" as with other environments, right?

           Thanks in advance.

        • 1. Re: Another Drop Down Question
          philmodjunk
               

                    just want a selection drop down, not something that would modify a field.

               How's that again? any drop down is a feature specifically designed to modify the value in the field that is formatted with that drop down.

               

                    Based on other forum posts, this probably involves a global field, but I'm not sure why it's not easier to just create the list without these extra hacks

               Not sure what "extra hacks" you are talking about here. Often a global field is used for a drop down list for finding records as this makes the process of scripting a find from the data in the field a bit simpler and also keeps the value selected by one user independent of values selected by other users who have accessed the same file at the same time. But a global field is not required in order for such a conditional value list to work.

               And a conditional value list is what you are describing here. I have quite a list of links on that subject. I'm going to include them all here, but you probably only need open either the first or second link--possibly opening the third if you want to see a file that demonstrates a conditional value list.

               There's a lot of overlap between the first two links so you can read one and skim the other. The demo file gives you several examples of different conditional value lists so you can examine them to see how they are set up. If you are using FileMaker 12 or later, you can open this demo file from your File menu to get a converted copy of the demo file that you can examine in your version of FileMaker.

               The next to last link discusses how to set up a chain of conditional value lists where the value selected in each conditional value list controls the values listed in the next value list and the very last link is a fairly new addition that describes how to use ExecuteSQL to produce conditional value lists that aren't easily possible with the other methods described here.

               Forum Tutorial: Custom Value List?

               Knowledgebase article: http://help.filemaker.com/app/answers/detail/a_id/5833/kw/conditional%20value%20list

               Demo File: https://www.dropbox.com/s/j6qf0z9fnem3uxd/ConditionalValueListDemo.fp7

               Hierarchical Conditional Value lists: Conditional Value List Question

               Using ExecuteSQL to produce a conditional value list: Using ExecuteSQL to Produce a Conditional Value List

               Feel free to post follow up questions here if those links aren't enough to get your value lists working correctly.

          • 3. Re: Another Drop Down Question
            MorkAfur

                  

                 Thanks Phil and David.

                 Yes, I got it working, but what I was getting at is that if I create a value list as a drop down, it seems to update the actual field in the table UNLESS I use a global field.

                 What I have always wanted in FMP, and how it works in the web overall (like creating a drop down list in HTML, for example), is just to be able to have a non-bound "picker". Being unbound means it is only used for display and selection. Once you select the value, then update another actual bound field or whatever.

                 Yes, a global field works in this case, but it's, to me, a hack since you should just be able to create a picklist using SQL, a relationship, or whatever without resorting to this extra step.

                 Of course FMP brings SO much to the table, it's difficult to justify AJAX and time-consuming JavaScript or other code to build a simple HTML page.

                 This global field requirement is no huge deal, but since it's different than other environments, it's repeatedly confusing. :)

                 Appreciated all replies.

                 Thanks again.

            • 4. Re: Another Drop Down Question
              philmodjunk
                   

                        Yes, I got it working, but what I was getting at is that if I create a value list as a drop down, it seems to update the actual field in the table UNLESS I use a global field.

                   Yes but that's really not the case. Whether you use a global field or a non-global field, a field's value is modified by selecting a different value in the value list. It's just a different field that is being modified.

                   Many people coming from other systems have wanted something along the lines of an "unbound text box", an object for accepting data from the user that is not linked to any specific field in any table in the database--a very common thing to do with a VB or VBA (MS Access) form for example. But FileMaker does not offer that layout feature. Thus, we most often use a global field to produce what is effectively the same result.

                   Note: we are just fellow users of the same software as you. If you want to suggest that FileMaker offer such a feature in a new version of FileMaker, you can user their feature request form to do so: http://www.filemaker.com/company/contact/feature_request.html

              • 5. Re: Another Drop Down Question
                MorkAfur

                     Thanks Phil.

                     Yes, I understand what you're saying, but it's still good to hear you describe what's happening upon selection. Makes it clearer. :)

                     I submitted a second request about this based on you posting the link above.

                     I really appreciate your replies.

                     Thanks as always.

                     - m