8 Replies Latest reply on Sep 29, 2009 9:37 AM by centerforart

    pop-up menu

    centerforart

      Title

      pop-up menu & scripts for all the options on the menu

      Post

      Hello,

       

      I am very new to the FileMaker world but I'm getting the hang of the basics very well. However the more advanced/dynamic scripts and such I am having some trouble with. So if you do have time to respond/give instructions, please feel free to be very detailed even with seemingly basic stuff (i.e. going to "File > Manage > etc).

       

      We have FileMaker Pro 10 on MAC, version 10.4.11.

       

      I'm not sure how to describe this without giving very detailed backround so please bear with me here.

       

      We have a database all about our partners. One of the fields in our database is a Radio Button set, and specifies if the partner is a  "Current", "Past", or "Potential" partner. I have already made buttons that run a script to display records of only "Current", "Past", OR "Potential" partners and it works just fine.

       

      There is another field in a database, which is a Checkbox Set, describing which area of our department these partners work with: "CSF", "Center Student Grants", "Community Arts", "SMART", "Engage at CCA", and "AFC".

       

      We would like to have the ability to make a Pop-Up Menu specyfing various scripts that finds "Current", "Past", or "Potential" partners but within a specific department as described in the other field.

       

      So the options in our Pop-Up Menu would be:

       

      "Display Current CSF Partners"

      "Display Past CSF Partners"

      "Display Potential CSF Partners"

      "Display Current SMART Partners"

      "Display Past SMART Partners"

      "Display Potential SMART Partners"

       

      And so on for each department listed above.

       

      And this is where I was stumped. I did make a Pop-Up Menu listing each option we want, but from there I wasn't sure what to do or where to go.

       

      I did a search online and on the forums but all I could find were results for one particular item in a pop-up menu needing a script vs. ALL of the options in the pop-up menu needing to run a different (but similar, obviously) script. I couldn't seem to apply the same suggestions in those threads to what we would like to have.

       

      I really hope I was clear and coherent :) thanks in advance for any help and please let me know if you need more information. Or if you need me to to clairfy further.

       

        • 1. Re: pop-up menu & scripts for all the options on the menu
          philmodjunk
            

          Assuming the text contained in each value in your pop-up menu exactly matches the corresponding radio button or check box value...

           

          #Extract the 2nd word of the pop up

          Set Variable [$status ; middlewords (table:: Popupfield ; 2 ; 1 )]

          #Extract words 3 through wordcount -1 of the popup

          Set Variable [$Dept ; middlewords ( table:: Popupfield ; 3 ; Wordcount (table:: popupfield) -3 ) ]

          Enter find mode []

          Set field ( table::radiobuttonfield ; $status )

          Set Field ( table::checkboxfield ; $Dept )

          Set Error capture [on]

          Perform find []

          Set Error capture [off]

          • 2. Re: pop-up menu & scripts for all the options on the menu
            centerforart
              

            Thank you for your response.

             

            I ended up finding this solution before seeing yours: http://laurenkuhlman.wordpress.com/2007/07/24/filemaker-dropdowns/

             

            And so far so good with the exception of SOME of the options in the drop down. For some reason, the only ones not working are the "current" searches despite using the same script format. The "potential" and "past" options work perfectly and display what I want/what I set it to. 

             

            I realize that it might be a little difficult to understand without someone viewing the actual file.

             

            Is sharing of a file allowed to have someone help troubleshoot the problem?

             

            • 3. Re: pop-up menu & scripts for all the options on the menu
              philmodjunk
                 You can post the file on a site that permits file sharing and then post the link to it here.
              • 4. Re: pop-up menu & scripts for all the options on the menu
                centerforart
                  

                Here is the file uploaded:http://www.speedyshare.com/115716299.html

                 

                The "Dropdown" field (with text next to it labeling it as 'Program Display') is what I am using to run various Find Record scripts. A user should be able to make their selection and then press the button next to it labeled "GO" in order to view those particular records.

                 

                Each one of the options in the "Dropdown" field correspond to a script. For exampe: the script "Display Current AFC Partners" is what should be run when "Only Current AFC Partners" is selected in the drop down. All the scripts for the options in the "Dropdown" are in the "Partner Program Displays" folder in the Manage Scripts area of FileMaker.

                 

                I created a 'Dropdown' script that has FileMaker recognize which selection a User makes in the "Dropdown" field and thus will run the related script when they hit "GO".

                 

                As I mentioned, all of them work perfectly with the exception of the "Current"-related items: "Only Current AFC Partners", "Only Current CSF Partners", "Only Current CSG Partners", "Only Current COMAR Partners", "Only Current Engage at CCA Partners", and "Only Current SMART Partners" are the ones that do not work.

                 

                I'm not sure why this is. When I take a look at the ones that work vs. the ones that do not when editing the 'Dropdown' script, nothing stands out. And when I take a look at the "Find" scripts themselves nothing stands out either. If I go to the menu and select one of the "Current" related scripts manually instead of trying to run it on the "Dropdown", it works just fine.

                 

                Any help is appreciated!

                 

                Thank you.

                 

                 

                 

                 

                 

                 

                • 5. Re: pop-up menu & scripts for all the options on the menu
                  davidanders
                    

                  Some filetypes can be uploaded and downloaded, some can't.

                  I would ZIP the Filemaker file before uploading. 

                  • 6. Re: pop-up menu & scripts for all the options on the menu
                    comment_1
                      

                    davidanders wrote:

                    Some filetypes can be uploaded and downloaded, some can't.

                    I would ZIP the Filemaker file before uploading. 


                    Can you attach a zipped file (or any file, for that matter) to your post?


                    • 7. Re: pop-up menu & scripts for all the options on the menu
                      philmodjunk
                        

                      I think you'd be much better off with the script I've posted above. The option you used works, but is very cumbersome and any changes you make to your data will require careful matching changes to your scripts and stored find requests.

                       

                      The "Current" options aren't working because there is an extra space after the last word. You have "Partners " instead of "Partners". That keeps the if statment from correctly evaluating.

                       

                      Open manage | Value LIsts and delete the space after Partners in each such value and it'll work.

                      • 8. Re: pop-up menu & scripts for all the options on the menu
                        centerforart
                          

                        apologies for not making it a zip! It was the end of a very long day and I didn't think to do so.

                         

                        However PhilModJunk helped me out with the problem. Again, a long day meant not seeing small details like a space after words.

                         

                        I think I will make another test file using your code above instead as well since as you mentioned what I have now really is a bit cumbersome.

                         

                        Thank you!http://forum-en.filemaker.com/fm/view_profile?user.id=3005