1 Reply Latest reply on Jun 18, 2014 9:28 AM by philmodjunk

    Find issue on Mac v10 but not PC v 11

    RGoyette

      Title

      Find issue on Mac v10 but not PC v 11

      Post

           I have a pull down menu that will execute a script OnOjbectModify.  This works correctly on a PC running FMPro version 11 but not on a Mac running version 10.  Anyone have an idea why not. 

           here is the script:

           Set Variable [ $bl; Value:Beamline Info::Beam Line Key ]
           Show All Records
           Enter Find Mode [ ]
           New Record/Request
           Set Field [ Beamline Info::Beam Line; $bl ]
           Set Error Capture [ On ]
           Perform Find [ Specified Find Requests: Find Records; Criteria: Beamline Info::Beam Line: “==$bl” ][ Restore ]
           Show All Records
           Commit Records/Requests[ No dialog ]
           Halt Script

           FYI The $bl is set correctly, as I can verify if I print it out with Show Custom Dialog right before the Find, but the find comes up empty on the Mac.

            

        • 1. Re: Find issue on Mac v10 but not PC v 11
          philmodjunk

               Your script could be simplified:

               Set Variable [ $bl; Value:Beamline Info::Beam Line Key ]
          Show All Records
               Enter Find Mode [ ]
          New Record/Request
               Set Field [ Beamline Info::Beam Line; $bl ]
               Set Error Capture [ On ]
               Perform Find [ Specified Find Requests: Find Records; Criteria: Beamline Info::Beam Line: “==$bl” ][ Restore ]
          Show All Records
               Commit Records/Requests[ No dialog ]
          Halt Script

               Removing the crossed out steps should have no impact on the final result. (But "Halt" might be needed if you have a paused script somewhere that needs to be canceled.)

               But the script step in red appears to nullify the entire purpose of your script and this would be the case on Windows and Macs. Regardless of what you select from your value list, you'll end up with an unsorted found set of all records.