Jump to content

FileMaker and Visual Studio Languages & Integration


This topic is 1668 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I'm currently developing an inhouse application Using Visual Studio 2019 in the C# Language. We have had some great success in pulling data from Filemaker through ODBC. The basic way the application functions is that once a drawing has been opened and is being viewed, the end user would like the ability to click a button and open a filemaker window and have it open to a specific record.

I'm not very familiar with Filemaker when it comes to development. I know VB.net and C# and a tad bit of JAVA. My question is what languages does Filemaker Data API support. I have seen some VB code in older documentation, but nothing since our company went to Filemaker Pro Advanced 18. We have an inhouse Filemaker developer who knows Filemaker but does not know C# or VB, so we have this huge disconnect when trying to interact with each others applications. I'm trying to find a way to enlighten both our fields of expertise with a little more insight to what is currently available as options for integration.

 

Any help on this would be greatly appreciate. Thank you!

Link to comment
Share on other sites

The Data API is just a REST web service, so completely standard.  C# has no problem with it.

You can also use this pre-built wrapper in your C# or VB.NET projects.  You can get it through NuGet.

The source code is here, which shows you how to call the Data API directly if you want, without the wrapper.  I'm using RestSharp to make the calls.

https://github.com/wimdecorte/FMdotNet__DataAPI

Similar wrappers exist for the old XML API too if you'd rather not use the Data API but want to get away from xDBC.  Just search GitHub for fmDotNet.

Link to comment
Share on other sites

The Data API is just for exchanging data with the hosted FM solution and to have the ability to run FM scripts server-side.

The requirement to have the user click on something in the .NET application and open the FM application and show a UI in FM is not handled by the Data API.  It is handled by constructing and executing an fmp:// url.  When FMP is installed on a machine it registers that URL protocol handler.

To get the syntax correct, use this page from the help:

https://fmhelp.filemaker.com/help/18/fmp/en/index.html#page/FMP_Help/opening-files-url.html

Link to comment
Share on other sites

  • Newbies

@Wim Decorte So your saying that this will give us the ability to actually open the Filemaker application and open a record in whatever layout we specify. That means that we will need to pass command line arguments, which will be the part number, from the C# application to filemaker layout field? Or will this fire a Filemaker script that will open the layout and do a search for the specific part number ? 

Link to comment
Share on other sites

In essence: yes.

But not command line arguments, everything is in URL syntax. The syntax allows you to open a hosted file and run a script in that file (and pass parameters to to that script).

The script would need to take care of doing the logic like navigating to the proper layout and presenting the proper found set (doing a find,...)

Note that authentication may be an issue unless you are using External Authentication in an SSO scenario (all Windows line-up).  Also note that if the user does not already have the FileMaker application running and the FM solution opened, executing the URL will also run the solutions "onOpen" sequence, which may interfere with the running of your intended script.  Those would things to consider and solve.

Link to comment
Share on other sites

This topic is 1668 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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