5 Replies Latest reply on Nov 3, 2015 9:44 AM by disabled_morkus

    Dwindling Value List Issues

      I have been going through the excellent YouTube tutorial on Dwindling Value Lists, but for some reason, although everything I'm doing looks the same, the dwindling part isn't working ... I still see all values in the list.

       

      I have a Vendor table, a categories table, and a vendor_categories table.

       

      I have a calculation field defined in the VENDORS table to be "CATEGORIES_SELECTED". This field, for now, is just a calculation: List(VENDOR_CATEGORY::CAT_FK).

       

      Per the video, I then relate this field to the TO for Categories TO I called "CATEGORIES_NOT_SELECTED"

       

       

      I created a value list corresponding to the categories not selected like this:

       

       

      I changed the field on the layout to use the new dropdown value list:

       

       

      After still allowing me to enter duplicates (for some reason the dwindling value list ... isn't), I see this in the VENDORS:CATEGORIES_SELECTED field:

       

       

      The value list dropdown, even though, as shown above, I'm using the "<>" relationship between vendors and "CATEGORIES_NOT_SELECTED" (the separate categories TO required), also shows that I can keep picking the same value over and over:

       

       

      A bit frustrating.

       

      Would welcome any suggestions.

       

      Thanks,

       

      - m

        • 1. Re: Dwindling Value List Issues
          jbrown

          Hi.

          did you view the sample file I posted on the other post you started regarding this? I have this very same set up going.

          The key might be to commit the records and/or refresh the window.

          In my sample file, I see it updating after i run my script that creates the new records in the child table, the Vendor_Category table.

           

          In your case you want to set a refresh-window script after you modify the dropdown.

          • 2. Re: Dwindling Value List Issues

            Hey Jeremy,

             

            Yes, thanks. The example from the YouTube video (Filemaker - Dwindling Value List - YouTube) barely uses any scripts at all. Yet, even following along with that video I am getting strange (different) results. Some of the categories don't show up in the list (one of them I added - but did a FM restart since I didn't explicitly do a commit - still doesn't show up) and, as before, I am able to keep adding the same value over and over.

             

            Another issue: "Alan Cooper" is in the People table, but, as you can see below, is not in the list.

             

            I think I'm following the video exactly.

             

             

            I've also attached the FM file I created (it's not complete per the video, but also not doing what the video's example is doing at the same point in the video).

             

            Do you see this issue?

             

            I've been looking at this for hours.

             

            Thanks,

            • 3. Re: Dwindling Value List Issues
              jbrown

              Hi. He does use a script. He talks about it and another method starting about at 16:45. He has an onObjectModify script trigger that runs when the user selects a name from a dropdown.

               

              The basic idea of this is that your relationship to the Non-Selected table needs to be refreshed.

              • 4. Re: Dwindling Value List Issues
                jbrown

                And FYI. The current set up will be a problem when you start with a new record in your Jobs table. There's nothing in the dropdown list because in a new record there's nothing in that calculated field. I'd amend the calculated field to put in a zero if there's no valid records between your jobs table and the people_not_selected table.

                 

                See my attachment. I've added the script trigger script, the delete and refresh and the new calculated field. Try out a new record and you will start with a 0 in the calculated field.

                • 5. Re: Dwindling Value List Issues

                  Thanks a Million!  It's all good.

                   

                  In my case, it turned out to be that, for whatever reason, I wasn't getting the same results as Guy's tutorial at the same part of it. Had I continued working though it, I would have realized that refreshing fixes all.

                   

                  The refreshing issue was my biggest, but not only, issue.

                   

                  It would be so nice if there were just a way, in some future FM version of course, to refresh a list (or whatever might be there in that version) with a SQL statement ... but now that this is working, and it's a fair amount to set up, I'm glad I learned it.

                   

                  Thanks again for all the help!

                   

                  - m