9 Replies Latest reply on Aug 24, 2016 7:55 AM by rzogby

    Running lists


      I have been using Filemaker Pro Advanced for quite a while. I have version 14 and have decided to make my interactive music catalog for customers a bit more interactive. I am new to scripting and have tried to look up various scripting books or sites, but nothing that helps me. I am hoping that this thread will bring out the experts that can help me.


      Here is what I want to do. I have created a self running kiosk app for customers to make a list of requests that they would liked played at an event. Currently, they can only scroll down, omit the track they want played, then choose show omitted (I created a button for all these actions), and then export to excel. If they try to search and omit, it doesn't save the one they chose.


      What I want to do is have them search for the song using a find button I created, then be able to click a button that would put it on a running list. Then when finished, I want to have a button that shows them the list they created so they can export (currently they CAN do that after they see their omit lists.


      Any help would be appreciated. I want to learn how to do it, not have someone do it for me. This way I can see how scripts work. I have worked with limited scripting built into FMA but can't figure out how an entry can be chosen and placed on a running list.


      Thanks so much everyone.



        • 1. Re: Running lists



          Thank you for your post!


          I am going to move this thread from the FileMaker Community Feedback Space, which is specifically for input on the Community itself, to the Discussions Space where you should receive even more views and potentially more advice!



          FileMaker, Inc.

          • 2. Re: Running lists

            Hello, Bob.


            There are a couple of ways to accomplish flagging a set of records.


            1) The quick and dirty method is to use a field, usually set as a checkbox, that the user checks off. The set of records where the checkbox is selected becomes the selected list.


            This works fine in a single-user environment. In a multiple-user environment, it breaks badly, because user A can flag the same records user B is trying to flag. That collision will break the flagged set. So you need something else.


            2) The more sophisticated way is to use a list of IDs stored in a variable or global field. Since variables and global fields are unique to each user, they won't step on each other. You can then create a script that loops over the list of IDs and creates a Find request for each one, isolating the found set.


            I use a Custom Function for the latter method that adds or removes a value from a return delimited list based on whether it's already there. But you can do something directly in scripting.


            So, to use the latter method, your selection script step might look something like this:


                 Set Field [ gList ; List ( gList ; currentTable::idField ) ]


            To remove an item from the list, you might do:


                 Set Field [ gList ; Substitute ( gList ; "¶" & currentTable::idField ; "" ) ]


            Then, when you go to Find the list, you do something like this:


                 Set Variable [ $count ; 1 ]

                 Enter Find Mode [ Pause: Off ]


                      Set Field [ currentTable::idField ; GetValue ( gList ; $count ) ]

                      Set Variable [ $count ; $count + 1 ]

                      Exit Loop If [ $count > ValueCount ( gList ) ]

                      New Record / Request

                 End Loop

                 Perform Find [ ]


            Okay, so what does this beast do? First, we set a counter, which allows us to pick out a specific value from among the list of values the user has selected. It then enters Find mode and starts inserting Find requests for each value. Once it runs out of values (which is when the counter exceeds the number of values in the list), it performs the Find.


            Now, this is a bare skeleton. It needs some additional goodies, like error trapping, the interface design, and so forth. But this should get you started.





            • 3. Re: Running lists

              It would be possible to set up a "request table" where each time a user selects a track, the script checks to see if it's already selected and if not, adds it to the list--building a combined list of requested tracks from multiple users. A field in this table could even count the number of times the track was requested by different users if that's a useful feature to have.

              1 of 1 people found this helpful
              • 4. Re: Running lists

                Thanks! Did't know where to post it.

                • 5. Re: Running lists

                  Hi Mike,


                  Thanks! Yes, It's for only one user. I've done the down and dirty in the modification of the app previously, but it asks for a value list in order to have a checkbox filled in. What am I missing? I'm trying to make the checkbox as an indicator to add to a running list. That's where I am lost.

                  • 6. Re: Running lists

                    Just make a value list with one value (like Y or 1). Assign that to the checkbox field.

                    • 7. Re: Running lists

                      Thanks Mike and Phil. I'm all set now. Just need to tweak it and it should work great. My next learning experience will be to do multiple scripts and writing an original script. I may call out if I need help. Again, thanks so much.



                      • 8. Re: Running lists

                        FileMaker Consultants, Data Consultants, Database Consultants

                        FileMaker Training Series | FileMaker

                        FileMaker Training and Tutorials | Lynda.com




                        These are some good resources for finding training and consultants. Dive in!  

                        • 9. Re: Running lists

                          Thank you. I will have a lot more questions, especially about

                          using scan bar codes to look up values of collectibles. Hope

                          someone will be as helpful as this community has.


                          Greatly appreciated.




                          Bob Zogby

                          The Definitive Disc Jockey

                          Cell: 585-330-8631




                          On Mon Aug 22 09:57:48 CDT 2016, TSPigeon