March 8, 200421 yr My FM 5.5 file has a lot of reports. Currently users have to go to a report layout and use buttons to choose the report they want. I would much prefer to group the reports and have users choose the one they want from a pop-up list or menu. When they select an item from the list, the associated script would be activated. A perfect example of what I am looking for is the "Jump To ..." menu at the top of the Right Brain forum on this site. Is there a way for me to associate scripts with items in a pop-up list using FM? I have looked at lots of posts but haven't come across the solution. I can't be the only one who wants to do this. (Perhaps I am the only one who doesn't already know how!) Thanks for your expertise - Mary Z
March 8, 200421 yr Hi Mary, You cannot directly call a script from a drop-down menu, but what you can do is use the drop-down menu for selection, then have a go button. The script for the go button would be calling other scripts dependant on the contents of the field containing the drop-down menu. So for example if the field was called ReportChoice and the drop-down menu contained: Sales Report Finance Report Marketing Report You already will have a scipt in place for each of these reports I presume, so the go button will call the correct sript dependant on the contents of ReportChoice... If ["ReportChoice = "Sales Report""] Perform Script [sub-scripts, "Sales Script"] Else If ["ReportChoice = "Finance Report""] Perform Script [sub-scripts, "Finance Script"] Else If ["ReportChoice = "Marketing Report""] Perform Script [sub-scripts, "Marketing Script"] End If End If End If Hope this helps Ed
March 8, 200421 yr On Windows you can format a drop-down menu as a button and put a Pause/Resume Script [0:00:00] in your script after a Go to Field ["thatfield"]. Nothing will happen until a selection is made, at which time the script continues and you can easily use the resulting selection to determine the next appropriate step. On Mac, you can do something similar, but I believe it requires looping until a selection has been made, instead of pausing. Lee will probably give you a more specific answer for that one.
March 9, 200421 yr Thanks Queue, you learn something new everyday Time to go and make a few adjustments to a couple of databases I think! Cheers Ed
March 9, 200421 yr The paused looping script can cause as many problems as it solves (like, what if the user exits the looping script?). I prefer the simple "go" button myself, fewer things to go wrong.
March 9, 200421 yr Perhaps on Mac it's not so good then. On Windows a user can't exit it, so it works smoothly.
March 9, 200421 yr Well, if they click on a button that is set to "Halt" already running scripts, then every script gets stopped. Ditto for a script that uses the Halt Script step.
March 9, 200421 yr OK, maybe I'll stick to my Go button! Less chance of a problem occuring that way! Cheers Vaughan Ed.
March 9, 200421 yr Author This did exactly what I wanted. It was especially helpful to have the script steps clearly detailed in Ed's reply. Thanks, Ed and all, for your collective wisdom! Mary Z : )
March 9, 200421 yr They can't click on a button when a script has a drop-down menu activated. They can only make a selection or click out of the field, click Continue, or press Enter, which only leave the field with its original data and continue the script. That's why this works so nicely on a PC.
Create an account or sign in to comment