Cloud And Go

Transcription

FileMaker Server/Cloud and GoSharing your FileMaker DatabasesFileMaker Server (and FileMaker Cloud) are the only means by which youcan share SUNRISE Contacts and any other FileMaker database solutionwith others online. Otherwise, you must use FileMaker Go to access thedatabases on iPads and iPhones. Either way, layouts and data will appearalmost exactly as in the original, with data updated in real-time so long asthe network remains active. We say almost. In FileMaker Server/Cloud,there is a feature called WebDirect that can almost perfectly reproduce thelook and feel of layouts of databases. If you want perfect reproduction, useFileMaker Go. However, if you only need to share some data in selectedfields of a database in a web page, you can program in HTML/CSS todesign a nice web page with the fields to display and include PHP totransfer the data to and from the web page to FileMaker Server/Cloud andto the databases.The most cost effective sharing solutionIf cost is a consideration when sharing FileMaker databases and their data,FileMaker Go is the cheapest sharing solution available to you. In fact, it isfree (and for a good reason too, as it allows Apple to peek at people’s dataand the copy of FileMaker Pro people have when pushed through Appleservers). So no silly licensing restrictions based on number of users. Don’thave a portable device to read the database? No worries. Apple has gotthat covered. The company just so happens to sell iPads and iPhones incase you need one.Another good reason to make FileMaker Go free.However, if you want to do the same for free via a web browser, this is nolonger possible. FileMaker Pro Standard and Advanced version 12 wouldallow databases to be shared between 5 (Apple) or 9 (the original Clariscompany) concurrent users for free and for as long as you like. Today, youmust purchase from Apple a copy of FileMaker Server or FileMaker Cloudto perform this task.For you to see the advantage in paying more to Apple for this privilege,data will be shared in real-time with other users and Apple has made aspecial effort to accurately reproduce the layout designs in FileMaker Goand in your web browser at a speed that is not much different than beingat the computer with the original databases (so long as the designs aresimple).That is what you are paying for.FileMaker Server or Cloud?Looking at the core of each product, there is virtually no differencebetween FileMaker Server and Cloud other than the fact that you can saveFileMaker Cloud on an Amazon server and all backups of the databases are

done automatically, whereas FileMaker Server can reside on your computerin the office (and you must handle the backup issues). The former letsAmazon control and host your databases, whereas the latter is the mostsecure and allows you to control the hosting of your databases. Either way,both products will host and deliver the data and layout designs of yourdatabases anywhere on the internet in a reasonably acceptable encryptedmanner on any modern web browserThe WebDirect OptionThis is by far the easiest and most powerful approach to sharing bothlayouts and the data. WebDirect is the fancy new marketing name fromApple Inc. for what was originally called instant web publishing (or IWP,being the old name when it was once free to use for up to 9 concurrentusers in FileMaker Pro 12 and earlier until Apple got its hands on theFileMaker Pro product from the original Claris Corporation, and noweveryone is forced to buy FileMaker Server or Cloud for the privilege —geez, thanks Apple!). In other words, you are effectively publishing ordirecting the databases to appear on a web browser, except now withWebDirect, you get the same feature as IWP, just with a little more finessesand refinement (since it uses the latest HTML5 for more accuratereproduction of layouts in a web browser). However, with this newrefinement and fancy name change, it means web publishing is no longerfree.How to enable WebDirectHere are the steps to access the layouts and data of SUNRISE Contactsthrough the WebDirect option:1.You must prepare your databases for hosting on the server. Toprepare the databases for Web Direct, press Command (or Ctrl) 8to see the list of all databases available in SUNRISE Contacts.2.Choose from the File menu Sharing à Configure for FileMakerWebDirect.3.For maximum security during this configuration stage, you wantto start from a position where no databases are being shared andno users can access them. To do this, select all the databases inthe left pane. Use the Command (or Ctrl) key as you click morethan one database to highlight them. On the right side, click theradio button that says “No user”. This will stop anyone fromaccessing the databases. As a final level of security, put a tick inthe check box that says “Don’t display in FileMaker WebDirectLaunch Center”. Now the users can’t see (or access) the databasesyou have.4.Ready to share your databases? Select which database to share.For the users, choose either “All users”, or select “Specify users byprivilege set” and place a tick against the privilege set shown.Once you are finished, press OK.5.If you have selected users to access shared databases by privilege

set, choose “Access ” in the File menu. This layout provides afurther level of control over which users in the privilege set canaccess the database. This is particularly useful for those guestusers who arrive to login to the database using their Windowslogin details. Each user will have a unique username and thesemust be entered as records in this Access layout (File menu andchoose AccessàTo This Database) for the database to acceptthem as legitimate users. Thus, in the Account Name field, enterthe username of each user (the one he/she will enter to log ontohis/her computer) like so Guest//Username. Additional fieldsshown in the Access layout called Full Name, Position, WorkPhone, Room and Email are there to help the administrator/owner(i.e., yourself) to contact users quickly and identify who isaccessing the database. Finally, the Status field tells theadministrator/owner of any problems for specific users, such aslogin failures. If you want the same users to access otherdatabases, the records of this Access layout can be exported (i.e.,you should see a file called access.exp). Rename this file toaccess.imp, and import the records into the same Access layout ofother databases to help speed up data entry work.6.Step 5 allows users to access the shared database(s). But toactually see the databases in the Launch Center (a web pagedisplayed by FileMaker Server in the web browser), you need toput a tick in the check box of those databases you want to bevisible. Remember, if one or more databases need access to datain another database but you don’t want the other database to bevisible, select that other database and put a tick in the check boxthat says “Don’t display in FileMaker WebDirect Launch Center”.7.Close the Sharing dialog box. Preparation is now complete.8.You can manually transfer the databases to FileMaker Server’sdedicated folder for hosting and serving the databases on anetwork. On a Mac, this is located in /Library/FileMakerServer/Data/Databases/. Or you can choose FileàSharingàUploadto FileMaker Server This will upload to the correct folder forserving. All you have to do is enter the host address and theadmin username and password of FileMaker Server to benefit fromthis latter approach.9.Make sure the folder’s file permissions for all databases allows forthe databases to be editable (if you want data in records tochange).10.Finally, the only other configuration to do is on the FileMakerServer side. Here, you must add the specific fonts you use todisplay text in the databases to the server’s own font folder. Bydoing this, printing the layouts of the database on a web browserwill ensure the text will appear exactly as they do in FileMaker Proon a client’s machine. You only need to do this once and forget,unless you intend to use different fonts in your layouts.

11.Launch FileMaker Server (if you have not done so already). If it isalready launched, the uploaded database(s) should be opened andappear in the Launch Center. In FileMaker Server, click theConnectors tab and click the link that says, “Open Launch Center”.Which databases should be visible and accessible?When deciding which databases should be visible in SUNRISE Contacts,decide what it is the users need to do online. Which databases will userswant to access? You can always choose to show all the databases to youronline users. But for greater security, it is better to hide databases that youknow users will never need to access. Remember, hiding does not mean noaccess. It only means users cannot see other databases, but the ones thatare visible can still access those databases. For example, contacts.fmp12requires postcode.fmp12 to obtain postcode information. Therefore,contacts.fmp12 can be made visible online, but postcodes.fmp12 can behidden from view on all web browsers while still allowing contacts.fmp12to obtain postcode data. To simplify the process of knowing whichdatabases are linked together for the Contacts, we recommend thefollowing:1.Prepare the databases using the free SUNRISE Contacts2020.exe/app by making visible only the contacts.fmp12, andleave all other databases hidden.2.Drag-and-drop the entire folder of core (or standard) SUNRISEContacts 2020 databases into the FileMaker Server databasehosting folder (ignore the self-running application supplied withSUNRISE Contacts 2020 known as SUNRISE Contacts2020.app/exe, this can be removed and serves no purpose inFileMaker Server).3.Launch FileMaker Server (if you have not done so already). Onlythe contacts.fmp12 database will be visible and accessible in theLaunch Center.Web browser accessThe final stage is to actually see the databases as hyperlinked text in a webpage. FileMaker Server/Cloud will display a default web page called theLaunch Center, but you do need to know the address to find this page.1.If your database(s) are being hosted by FileMaker Server, it is timeto open your web browser.2.For local access directly to the Launch Center via your FileMakerServer machine, type in the address: http://127.0.0.1/ (orwhatever web address is specified by your administrator). If youhave changed the port number (the administrator will tell youthis), try http://127.0.0.1:n, where n is the port number. If thedatabases are to be served on the internet, your ISP or ICT staff

member should give you a unique and static IP address (justreplace 127.0.0.1 with the IP address you have been given). Betterstill, a https domain name address should be provided. Type thisaddress into your web browser. A web page will open and youshould see a link to your visible database(s).3.Click the link shown for a database to open it.4.Type your username and password for the database. Click Login. Itcan take up to 20 seconds to display a reasonably complexdatabase layout. Once the layout shows up in the web browser, itshould be very quick to navigate through the records (and throughmost other layouts given the consistency in layout design).RECOMMENDATIONTurn off Firewall, or set up the Firewall such that a port can be openedexclusively for FileMaker Server to publish the layouts and data over anetwork.

FileMaker Server PHPAccessing your databases the geeky wayThe PHP OptionThe alternative to WebDirect is to naturally go the geeky way, which is toapply either PHP, XML or REST APIs, or a combination of all three if yourequire it. In this way, only the data will be shared between a user and yourdatabases (no layout designs will be shown). You only need the ISP’sstandard web browser to display web pages, and an understanding of PHPor similar code to tell the web server show to communicate with theFileMaker Server. The web server will grab and send data to and from theweb page into FileMaker Server and ultimately into the database in theappropriate way.We will leave the XML option aside as PHP is more popular. And indeed,XML is becoming obsolete in FileMaker. Whereas REST (or RepresentationalState Transfer) is the new standard compliant technology introduced inFileMaker Server 16. In fact, this could soon be the way of the future andmay see PHP also obsolete.In FileMaker Server 16, REST isn’t yet fully matured in this release. InFileMaker Server 19, expect a much more powerful set of REST features tobe available.Just for your information, REST will soon replace PHP and XML as thestandard way to communicate with FileMaker Server and all other thirdparty services, such as Google Maps, Microsoft SharePoint, and so on. Ituses the HTTP method (or web address structure) of applying the fourbasic operations to any data (as well as the records, and eventually eventhe scripts running inside the databases when the technology is morerefined in FileMaker Server). You may have seen these HTTP methods in theweb address bar through the words POST, GET, PUT and DELETE. If you arefamiliar with web forms, you may have seen in the HTML code the POSTmethod as a means of transferring data in an online form to a PHP text filehandler that then decides where the data should be sent for processing.The GET method is the most common. This is regularly used in web pagesto read (or get) data from somewhere and display it on the screen. WhereasPUT and DELETE are used to update and delete data, respectively. Withthese four HTTP methods (sometimes given the acronym CRUD by geekypeople to help them remember), you can do pretty much everything youneed to Create (or POST), Read (or GET), Update (or PUT) and Delete anykind of data, including the records themselves when it comes to FileMakerServer.The version of REST introduced into FileMaker version 16 is limited to thePOST and GET methods5. Still powerful in what they can do, you canachieve much with just these two methods. Other than that, these twomethods will not allow scripts inside FileMaker to be run as yet. However,when REST does get its full set of HTTP APIs enabled and have the ability to5FileMaker developers employ the HTTP methods using the Insert from URL script step. For a list of APIs thescript step can access and grab information, visit https://www.programmableweb.com/apis/directory.

use them in all aspects of a FileMaker database, expect this to be the wayof the future.Until REST is fully integrated into a future release of FileMaker Server andcan use all the HTTP methods available to its fullest extent, let us focus onPHP for now.The PHP approach to accessing data in a FileMaker database served byFileMaker Server and the ability to perform two of the most importantCRUD operations is actually simpler than many people think. However, itdoes require you to dive into a little PHP and HTML programming to seewhat needs to be added for communication with FileMaker Server to besuccessful. Because of this situation, it is not surprising most non-geekypeople will prefer the WebDirect approach. However, for those willing to trytheir hand with PHP and HTML, here are the essential details you need toknow to make this work for you.The essence of FileMaker PHPImagine you have a basic HTML text file written like so, !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 -strict.dtd" html xmlns "http://www.w3.org/1999/xhtml" head title HTML Form /title /head body form action "message handler.php" method "post" label First Name: /label input name "First Name" type "text" / br / label Last Name: /label input name "Last Name" type "text" / br / label Email: /label input name "email" type "text" / br / label Message: /label textarea name "message" cols "40" rows "20" /textarea input type "submit" value "Send" / /form /body /html

The critical part here is shown in blue. The rest of the text surrounding theform itself is what you need to tell a web server that this text file is writtenin HTML and should be rendered nicely on a web browser. For thepurposes of this example, let us save this text file as myHTMLform.htm.As you can see in a web browser, we have a web form with four fieldstogether with corresponding labels telling you what they are. Where yousee text between label /label means it will be shown in the webbrowser. Where you see input / means an empty box (or field) willappear next to the label, which is the place where you can type text insidethe box. The input type ”submit” / simply means a button will beshown to help you click on it in order to submit the data in the fields to aPHP file designed to handle the data. The PHP file is calledmessage handler.php as the code in the web page form shows. We know itwill be submitted to this file because the HTTP method chosen is calledPOST, much like the way a post office worker will post your envelopecontaining data to a specified address (in this case a PHP file namedmessage handler.php).The above code is all good and fine if you merely want the PHP handler fileto send the data in the form to some location for you to access and laterre-type the data into a FileMaker record. But why would you want to dothat? To save time, you can get the PHP handler file to go direct to theFileMaker database, create a new record, and store the data automaticallywith the help of FileMaker Server. Before we look at this PHP handler filemore closely to see how this works, let us improve the versatility of theHTML web form.Notice how the text fields in the HTML form appear empty when viewing ina web browser. When you enter data, there is a risk that you could lose thedata if, for instance, you decide to refresh the page, or move to anotherpage and then return to the HTML form. You might consider this to beokay. But what if you want to retain the data for a little while longer? Inthat case, let us introduce some useful improvements to the form asshown below in red. ?PHP/* Session start is essential to retain information even during a pagerefresh */session start();/* To retrieve data previously entered when the form was incomplete, wecreate this function and use it in the HTML form.*/function getField( field) {if ( array key exists('post', SESSION) andarray key exists( field, SESSION['post']) ) {return SESSION['post'][ field];}}?

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 -strict.dtd" html xmlns "http://www.w3.org/1999/xhtml" head title HTML Form /title /head body form action "message handler.php" method "post" label First Name: /label input name "First Name" type "text" value ” ?PHP echogetField(‘First Name’);? ” / br / label Last Name: /label input name "Last Name" type "text" value ” ?PHP echogetField(‘Last Name’);? ” / br / label Email: /label input name "email" type "text" value ” ?PHP echo getField(‘Email’);? ”/ br / label Message: /label textarea name "message" cols "40" rows "20" value ” ?PHP echogetField(‘Message’);? ” /textarea input type "submit" value "Send" / /form /body /html Notice how we remain consistent in the names of the text fields whenintroducing the PHP code to retrieve data. It is recommended that youcontinue this with the names of the fields used in the FileMaker database.Or else FileMaker Server will get confused later, and the PHP handler filewill have to be programmed in a more complex way in order to create whatwe call the equivalent of the Rosetta Stone of PHP programming to link thefields names in your HTML form and PHP code to the names of the fields inthe FileMaker database. Not hard to do, but it is best to keep things simpleby being consistent in the naming of your fields, especially if you don’t liketo do much programming.You will also need to change the file extension of .htm of the HTML formto .php. Why? You need to tell the web server that there is PHP code in theHTML form so that it can process code correctly. Otherwise the PHP codewill appear

Contacts 2020 databases into the FileMaker Server database hosting folder (ignore the self-running application supplied with SUNRISE Contacts 2020 known as SUNRISE Contacts 2020.app/exe, this can be removed and serves no purpose in FileMaker Server). 3. Launch FileMake