Jump to content

Search the Community

Showing results for tags 'fm php api'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Community Forums

  • The New FileMaker Platform
    • FileMaker Pro Advanced 18
    • FileMaker Server 18
    • Zabbix Server Monitoring
    • Save Schema as XML
  • Community Resources
    • Community Articles, Tips, & Techniques
    • FileMaker Marketplace Discussions
  • FileMaker Platform
    • FileMaker Interface Features
    • FileMaker Schema & Logical Functions
    • FileMaker Go for iPad and iPhone
    • FileMaker and the Internet
    • FileMaker Pro Advanced 17
    • Legacy FileMaker Platform Discussions
  • FileMaker Server Administration
    • FileMaker Server 17
    • FileMaker Server 16
    • FileMaker Cloud
    • FileMaker Custom SSL Certificates
    • oAuth and External Server Authentication
  • Brain Food
    • Security Concepts
    • The Left Brain
    • Upgrading & Migration
    • Data Analysis
    • Development Standards
    • The Separation Model
    • Relational Database Theory
    • Damaged / Corrupt File Problems
    • Bar Codes (Printer, Scanners, Software)
    • Hardware & Networking
    • OS Level Database Automation
    • Product Ideas
  • JavaScript Integration
  • FMForums Affiliates & Sponsors
  • FileMaker Classifieds
  • FM Forums Operations
  • FileMaker Friday Night Chat's Topics

Blogs

There are no results to display.

There are no results to display.

Categories

  • White Papers
  • Infographics
  • Samples
  • Solutions
  • FMGo
  • Plug-Ins
  • Tutorials

Product Groups

  • Workplace Innovation Platform
  • Site Advertising
  • Development & Hosting

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Title


Industry


Location


Interests


Website URL


Skype


MSN


Yahoo


OS Version

Found 1 result

  1. Hi Guys, I have only started working with FileMaker for the last 2 months or so, and I didn't like the way that the API is very procedural driven, so I decided to make a class which would help me. I have got a function which I have made which interacts with the FM PHP API (Official) which I am trying to get sorted. The idea to the whole class is to save time writing each function over and over again, but basically I have got this function which I am having problems with which is to get the FileMaker Layout Fields and Values of those fields and put them into an array. Here is my code: /** * Selects data from a FileMaker Layout from the given criteria * * @author RichardC * @since 1.0 * * @version 1.2 * * @param string $layout * @param array $arrSearchCriteria * * @return array */ public function select( $layout, $arrSearchCriteria ) { $arrOut = array( ); if ( ( !is_array( $arrSearchCriteria ) ) ) { return false; } $findReq = $this->fm->newFindCommand( $layout ); foreach ( $arrSearchCriteria as $field => $value ) { $findReq->addFindCriterion( $field, $value ); } $results = $findReq->execute(); // Adds all the fields in the layout to the array $this->fields[] = $results->getFields(); if ( $this->isError( $results ) === 0 ) { $records = $results->getRecords(); //Set the last used layout and object $this->layout = $layout; $this->lastObj = $records; //Loops through the records retrieved foreach ( $records as $record ) { $arrOut[] = $record; //Here I want to Get the Layout FieldNames and Values into an array -> example : $arrOut['user'] = 'DarkMantis' } } else { $arrOut['errorCode'] = $this->isError( $results ); } return $arrOut; } As you can see there, I have commented in that I want to get the Details into my array. If you have any ideas on how to do this it will be greatly appreciated. [Edit] I do apologise for the messy code, it was more of a PoC. [/Edit] Best Regards, DarkMantis
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.