Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

fuzzzerd/fmDotNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileMaker Data Api

This project is not actively maintained. If you are looking for a .NET client for the new FileMaker Data API, check out https://github.com/fuzzzerd/FMData. It has full support for the Data API and partial support for the XML API and works with modern .NET.

fmDotNet: a wrapper for the FileMaker XML API

This is a fork of the original fmDotNet. It includes additional coverage of the FileMaker XML API that was not present in the original version. Most notibly support for the -findquery operation via the fmDotNet.Requests.CompoundFind class. Our fork also includes a set of unit/integration tests.

If you are familiar with FileMaker Pro 6 CDML Web Publishing or the FileMaker PHP API, fmDotNet will feel familiar to you. Many of the core principles and techniques are the same. The operations and vocabulary are the same as in FileMaker Pro.

The integration tests provided with this library have been tested against FileMaker Server 12 and 14 with full passing grades.

Getting Started with fmDotNet

fmDotNet is available on NuGet!

To install fmDotNet to your project, from within Visual Studio, run the following command in the Package Manager Console

PM> Install-Package fmDotNet

Nuget Package Site: https://nuget.org/packages/fmDotNet/

Using fmDotNet in Code

You can start querying data from your FileMaker database with just a few lines of code:

var fms = new fmDotNet.FMSAxml("YourServerName", "user", "passw0rd");
fms.SetDatabase("yourDatabase");
fms.SetLayout("yourLayout");
var request = fms.CreateFindRequest(Enumerations.SearchType.Subset);
request.AddSearchField("YourFieldName", "value-to-query-for");
var response = request.Execute();

You can query against related data too:

var fms = new fmDotNet.FMSAxml("YourServerName", "user", "passw0rd");
fms.SetDatabase("yourDatabase");
fms.SetLayout("yourLayout");
var request = fms.CreateFindRequest(Enumerations.SearchType.Subset);
request.AddSearchField("RELATEDTALE::RelatedField", "value-to-query-for");
var response = request.Execute();

Note: the search is on related fields via Table::Field where the related field is on yourLayout.

You can perform complex finds with code like the following:

var fms = new fmDotNet.FMSAxml("YourServerName", "user", "passw0rd");
fms.SetDatabase("yourDatabase");
fms.SetLayout("yourLayout");
var cpfRequest = fms.CreateCompoundFindRequest();
cpfRequest.AddSearchCriterion("Colors::Name", "Blue", true, false);
cpfRequest.AddSearchCriterion("Colors::Name", "Red", true, false);
var response = cpfRequest.Execute();

This finds all items where the color is Red OR Blue.

Additional fmDotNet Example Usage

Browse the code in the test project fmDotNet.Tests for basic usage of the library. This is the automated test code that is used to ensure that fmDotNet functions correctly. It is a good place to see how specific tasks are completed using fmDotNet. In the future, we would love to have a full sample application showing usage of fmDotNet in the context of a real application.

Key Differences

There are several differences between this fork of fmDotNet and the original. This version

  1. Uses HTTP POST for all requests to FileMaker Server
  2. Has method, property, and field names in line with MSDN Naming Guidelines
  3. Does not include support for ADODB RecordSets
  4. Is compiled against .NET 3.5 SP1

Contributing to fmDotNet

  1. Fork us! Make improvements, add more (or better) tests. Then make a pull request.
  2. Submit an issue/bug with steps to reproduce it.
  3. Create a wiki page with more detailed examples, tutorials, or documentation.

Please make sure that that changes you submit to the core fmDotNet project pass the tests in fmDotNet.Tests or explain why they don't and why the test should be updated.

FileMaker Documentation

Documentation for the FileMaker APIs that fmDotNet covers are linked below.

  1. FileMaker Server 12 Web Publishing with XML
  2. FileMaker Server 11 Web Publishing with XSLT and XML

Versioning

We attempt to stick to Semantic Versioning. Using the Major.Minor.Patch syntax, we attempt to follow the basic rules

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards-compatible manner, and
  3. PATCH version when you make backwards-compatible bug fixes.

License

Common Public License Version 1.0

About

FileMaker Custom Web Publishing Client. This is a fork of fmDotNet from http://fmdotnet.sourceforge.net/. Includes new features like -findquery.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages