5 Replies Latest reply on May 11, 2011 8:07 AM by philmodjunk

    Stuck With Reporting Scripts



      Stuck With Reporting Scripts



      I'm having some issues with a couple of reporting scripts. Sometimes they work, most of the time not though. Can't figure out what's causing it. The scripts are more or less the same so I've attached a screenshot of one of them.



        • 1. Re: Stuck With Reporting Scripts

          do you have fmp advanced? script debugger is a great way to figure out where things go wrong.

          if not, you can take the script a step at a time, create a new script and copy and paste a script step at a time while running each time you add a new one to see if things are flowing.

          Another way to achieve the result of the script you posted is instead of setting a variable, set a global field on a table, then join that field to the pk_property_id field on the property table (could even be a self join) and use go to related record. In my personal experience, I have found that to be a quicker more accurate way to perform finds. Especially when you get into more elaborate finds, where for example you want things in stage 1,2 or 4. In a scripted enter find mode you would need three find rows of finds, where as with the relation find you can set a global text field and enter "1¶2¶4" and you get your result. Diving further into this techinque you can add buttons on a layout in which users can quickly and easily select what they want to see in the report via portal rows for example, and set the button to add that portal rows particulars to the relation global field.

          Hope this helps.

          • 2. Re: Stuck With Reporting Scripts


            if u using ur script to run on a server, u need to putt "Set Error Capture  On" before " Perform Find"



            • 3. Re: Stuck With Reporting Scripts

              This script could produce different results depending on which layout is current at the time you perform your script. So that is one possible explanation for getting inconsistent results from it.

              • 4. Re: Stuck With Reporting Scripts

                yeah !! PhilModJunk is right,

                start ur script with Go To Layout ("the layout that contains PK_Property_ID") 


                • 5. Re: Stuck With Reporting Scripts

                  Maybe I'm right. If this script is always run by clicking a button, The Go To Layout step may not be needed as you may already be on a layout that works and there could be some other factor we haven't discovered yet.