1 Reply Latest reply on Jun 6, 2014 6:56 AM by philmodjunk

    Update record filemaker script and php api

    SarahRonquilo

      Title

      Update record filemaker script and php api

      Post

           Hi, Im a total newbie on filemaker scripts. I need a script that will update the record in the filemaker.
           I would like to call the script from my php then pass an array variable containing the data to be updated:

           $editRecord = $_FMP_CONN->newPerformScriptCommand($table, 'Myscript',  $data);


      NOTE: $data is an array and $table is layoutname

           I need a filemaker script that would basically go with this algo:
           1: find the record
           2: update the record
           3: get the updated record

            

           Thanks!

        • 1. Re: Update record filemaker script and php api
          philmodjunk

               And what criteria will you use to find the correct record?

               Some examples of Scripted Finds: Scripted Find Examples

               And where will the data come from to update the record? What data will that be?

               A script can use set field to modify the value of a field, but what you would put in the "calculated result" parameter of this script step has not been specified by you.

               "Get the record" may have meaning in the context of PHP (I have no experience with that method of custom web publishing), but it is meaningless in the context of just FileMaker. Once you find the record, you already have a found set of just that record and it is the current record. Nothing else would be done to "get" a record.