From the course: Learning Claris Connect

Preparing your FileMaker file for Claris Connect

From the course: Learning Claris Connect

Start my 1-month free trial

Preparing your FileMaker file for Claris Connect

- [Instructor] Before we get to allowing Claris Connect to make changes to your Claris FileMaker app, there is a couple of things that you're going to need to do in order to prep your FileMaker app to allow Claris Connect flows, to interact with it. I'm going to cover those here in this movie. Now, first of all, Claris connect will communicate with your app through the FileMaker data API. That means it needs to be hosted on an instance of FileMaker server. And then you need to configure connections that allow the file maker data API. In order for you your app to work on that instance, you'll need to go into file, manage security. So in order for your file to be hosted on any instance of FileMaker server there's an extended privilege that you're going to need to activate in your privilege sets. Those can be accessed under advanced settings. And you'll notice here that I have just the default privilege sets. If you are working with your apps correctly you've probably got a bunch of custom ones. Whichever ones you're going to be using that are going to have the account that you're going to use to authenticate against your app when you're using Claris Connect, those will need to have these extended privileges. So you see that I've gone into edit privilege set. And the first one that I'm going to need to have activated, which is not on by default, is access via FileMaker network. That's called the FM app extended privilege. Make sure to turn that one on or simply put, you won't be able to access your file on FileMaker server. Now specifically for the purposes of communicating from Claris Connect, you'll need to have the access via FileMaker data API extended privilege activated as well. That one's called the FM rest. This will allow incoming requests from Claris Connect via the data API. Again, your FileMaker server instance will need to allow incoming requests from FileMaker data API. So make sure to go turn that on in whichever version of FileMaker server you're using. So that's on the privilege set side, but if we go back to the accounts, you'll notice that what I've done is I've set up a special account. This is going to be the account that I'm using to authenticate against my FileMaker app from within Claris Connect. So I set up an account name of Dappy and gave it a password. You don't need to call it account named Dappy. You can call it whatever you want. But then what I've done is assigned it to the privilege set that's going to have those extended privileges activated. Those are the ones that I discussed just a moment ago. And they do not need to be full access. As a matter of fact, I'm just doing that here for demonstration purposes. I think really I would recommend that you set up a custom one, which you'll see in the next file that I'm going to show you. But before we get to that file, let me go back to a couple layouts that you should be creating. I'm in layout mode right now. So let's just say I have a file maker file that has event data in it and attendee data in it. And I want to communicate with those two different datasets. So what you're going to need to do, is create one layout for each table context that you want to communicate with. Don't worry about the word context. All I'm saying is, if you want to communicate with events, which I do in this case, then go into layout mode and create a layout that's based on events. Like for example, when you say new layout, you could choose events. You can call it whatever you want. I like to use a special naming convention for mine, so I can see that their API layouts and the idea here is that I'm going to create a layout that my Claris Connect requests can communicate with, but then I'm going to make some decisions on what fields I want to add to that layout. And those are just going to be the fields that I want to communicate with. These are either going to be the fields that I'm sending as JSON data or fields that are going to be edited or filled in when you're creating FileMaker records. So this is a way that you can isolate just the layout that has the context you need and only the fields in that table that have that same context that you need. So speaking in non database terms, I'm creating a layout based on events that I'm putting in only the fields in events that are going to be the fields that I want to work with. Now, don't worry about this. This is just here so that you can visually see. These are actually the fields that I'm going to be using for my JSON data when I get into my FileMaker script. This is just simply here for reference. This is not required, it has no functional benefit. Now that happens to be events, but let's say in my case, I'm going to communicate with the events table, but also I might communicate with the attendees table. So in this database, I go into FileMaker relationships. You see that I have events that have relationships and then have attendees. So I've already created a way that my Claris Connect flows can communicate with the events table through that one layout. I'm going to create another one for attendees. But notice that registrations are the child of attendees. So what I've done here is I've combined those together into one layout. This is just a technique it's not required but this could save you creating a layout. So in the case of event bright which is what I'm communicating with here, there's really a one-to-one relationship between attendees and registrations in the event that I'm creating. So what I did was I put fields from the attendee table on this layout that's based on attendees, along with fields from its child table registrations. Now this again is not required. I'm showing this example in case you have one of these sophisticated environments where you are communicating with not only the parent, but the child as well. Just letting you know you can do all those through one layout. But most likely all you're going to have to do is just create the one layout based on the one table that you want to communicate with and put all the fields that you want to communicate with there. So if this sounds a little confusing, good news, there's only one exercise file for this entire course and it can be found in 06 02. If you go download the exercise files, of course if you have access to those, you'll find 06 02. You'll also find a text file with a log-in in it. And when you open that file up you'll see that I've already gone in and configured manage security. I've not only created your account for Dappy, but I've gone ahead and created a custom Dappy privilege set. So the reason that you might do something like this is that this allows you to go and create custom layout privileges, record privileges, script privileges, whatever it is that you want to do to really lock down only that one layout. So for example, I could go in here and I could say only allow me access to this one layout. So in that case what I would do is I would say view, I would say modifiable if I want to, or no access, whatever. In this case you want to keep these modifiable and you can do whatever you want with the other tables. It's not that you're going to use this file. I just want it to supply this file as a guide for you. You'll see also in the privilege set, I've created a special privilege set like I just mentioned, I've activated the FM app and FM rest extended privileges for you already. Additionally, what I've done is I've created an example of one of those layouts for you. So that you can use this as a guide when you're setting up your own file. And finally, even though we'll talk about these scripts a little bit later on, you'll see that I've created a sample script for you. This is really important because you have to follow very specific guidelines when you're setting up these scripts to be able to trigger Claris Connect flows. And so I've put a template here for you and you can just keep copying this one or modify the one here. I figured this would be a really easy way for you to get started.

Contents