Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.
Nate Bross edited this page Mar 22, 2018 · 4 revisions

Getting Started with fmDotNet

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 on 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();

You can edit also 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. Note the search is on related fields via Table::Field.

Clone this wiki locally