Aller au contenu

Blogs

 

Introducing Admin FM – the FileMaker Admin API for Zapier

Introducing Admin FM – the Zapier integration for accessing the FileMaker ® Admin API in an easy, customizable way. Built using Node.js, this version of Admin FM is currently a beta version, but it allows you to access most of the functionality that the FileMaker Admin API allows. What is Zapier? Let’s take a moment […]
Afficher la totalité du billet

vincenzo

vincenzo

 

FileMaker et le grand écart logiciel…

Ces derniers temps, nous avons beaucoup parlé de la compatibilité de la nouvelle version du système d’exploitation Mac OS X 10.14 Mojave avec FileMaker… Certains parmi vous ont eu la mauvaise surprise de ne plus pouvoir lancer leur FileMaker 14 une fois Mojave installé. D’autres s’interrogent de savoir s’ils ont intérêt à faire la mise à […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Powerful Summary ListOf Fields

One of the nicest additions FileMaker made awhile back was within an area you wouldn't quite expect. It was within the Summary functions that FileMaker added a simple new option named ListOf. This happened with FileMaker version 13 and this one type of summary field can be use for so many different things within the user interface that it's quite invaluable for driving all kinds of user feedback. With a ListOf summary field, you can control the content of a custom portal, grab data necessary for looping over, or simply show the user an overview of the records they have loaded in the current found set. Understanding how to use, and take advantage of, the ListOf summary field is what this video is about. We'll walk through two different uses and take a look at a nice user feature which allows the user to determine which data they would like to interact with. If you've never used a ListOf summary field, then you certainly need to be aware of what's covered within this video! Click the title or link to this article to view the video.
Afficher la totalité du billet

FileMaker Magazine

FileMaker Magazine

 

Truc n°89 – Créer un en-tête de suite dans un rapport FileMaker (2)

Dans notre article précédent, nous avons vu qu’il est possible d’ajouter une indication dans l’en-tête d’un rapport, pour nous rappeler où nous nous trouvons dans le récapitulatif lorsque cela ne nous est pas indiqué dans une page de suite lors d’une impression ou d’une prévisualisation. Très concrètement, notre objectif est d’obtenir le résultat suivant en […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Mail Merge with FileMaker

Mail Merge with FileMaker 493.4 million pieces of mail are delivered every day by the US Postal Service. If you currently hand type your business’s envelopes, letters, and other complex documents like proposals and legal forms, you would greatly benefit from using mail merge. Mail merging, the process of filling in a template document with records from a data source, saves countless hours of double data entry and reduces human error; instead of typing out each recipient’s information, Microsoft Word (or another similar word processor) automatically does all the work for you. In addition it is possible to create mail merges with records from your FileMaker system to save even more time.  Basics of Mail Merge To create a mail merge, you need two things: a template and a data source. In this example, we will be using Microsoft Word to create a template, and FileMaker as the data source. If you do not have Microsoft Word, there are plenty of other free word processors out there that are able to perform mail merges. Exporting FileMaker Records In order to prepare your FileMaker records for mail merging, you need to export them as a .mer file. To export a merge file: In your FileMaker system, get into the found set of records you would like to merge with your template. Click “File” > “Export Records,” change the file type to “Merge,” and choose where you want to save your file.
In the “Specify Field Order for Export” dialog, chose the fields you want to be able to merge in your template file and click export. Your mail merge data source can be other file types, but a .mer file is certainly the easiest to create from FileMaker. Creating Your Mail Merge Template Because mail merging has been around for a while, many people will already have their templates ready. In case you don’t, however, the process is very straight forward: Create a document with your preferred word processor. Choose the .mer file that you exported earlier as your data source. To do this in Microsoft Word 2016, click “Mailings” > “Select Recipients” > “Use an Existing List” and find your .mer file. Place fields in the template where necessary. In Word, click “Mailings” > “Insert Merge Field” and select the field you wish to place in the document. If you wish to view what your filled out template looks like in Word, click “Mailings” > “Preview Results”. Now your template is all set for merging! You can reuse this template for later mail merges. The image below shows what your Word document will look like before and after the mail merge respectively. Things To Note There are more ways to make the process even easier! We have created a FileMaker file that allows users to export contact records and a mail merge template with a few simple clicks. If you change the name of a field in FileMaker that is also used in your mail merge, you will need to update the corresponding variable in your template file. If your solution requires more automation, you can use FileMaker plugins like 360Works Scribe or MonkeyBread Software to automatically generate documents without the need for exporting records. You can also use AppleScript instead of plugins to automatically generate documents out of FileMaker, but you will still need to export the .mer file and have AppleScript automatically run the mail merge in Word or a similar word processor. Conclusion Using mail merge with FileMaker is a highly efficient technique at generating documents as simple as letters to as complex as proposals or legal forms. Feel free to contact us if you would like assistance generating documents from your FileMaker system! Download Mail Merge with FileMaker Database Please complete the form below to download your FREE FileMaker database file. Name* First Last Company Phone* Email* Deployment Assistance?Please contact us to assist integrating into your FileMaker Database. Yes Terms of Use I agree OPT-IN: I agree that I am downloading a completely free FileMaker application file with no strings attached. This database is unlocked, and I may use it for my business or organization as I see fit. Because I am downloading a free database, I agree that I should receive occasional marketing. I understand that I can OPT-OUT of these emails at anytime.
Afficher la totalité du billet

DB Services

DB Services

 

FileMaker : une place unique pour travailler avec nos données !

La semaine dernière, je vous présentais un peu ce qui se cache derrière l’expression « Workplace Innovation Platform », expression que l’éditeur FileMaker inc. a introduit récemment pour désigner ce qu’il nous propose en termes d’outils de gestion de données. S’il lui a fallu inventer une nouvelle expression, c’est que la plateforme FileMaker tient une place originale […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Design Tips for List Views

What would our world be if we didn't have list views? They're the ubiquitous method for viewing a selection of items in relation to each other. In FileMaker, you can sort them, filter them, apply conditional formatting and basically present your data however you wish. Heck, most of the smart phone revolution revolves around a list view. A list of data, a list of settings, a list of options, a list of pretty much anything and "the list" goes on an on. There are, however, a number of settings within FileMaker's List View which you need to know about in order to creatively present your data. You're probably shooting for something both appealing and easy to visually process. When you apply the knowledge learned in this video, you'll be a master of List Views and able to present a wide variety of data for a wide variety of situations. Click the title or link to this article to view the video.
Afficher la totalité du billet
 

Truc n°89 – Créer un en-tête de suite dans un rapport FileMaker (1)

Améliorer l’interface utilisateur des rapports Parmi les sujets concernant les listes et des listes de valeurs, l’un de ceux sur lequel certains parmi nous butent, ce sont les rapports avec récapitulatifs et sous-récapitulatifs… au point parfois de les ignorer superbement ! Dommage ! Car on peut faire beaucoup de choses intéressantes avec… Et l’on peut aussi […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Point, set et match !

Point, set et match ! Un entraîneur de la Fédération Anglaise de Volleyball a développé une application FileMaker pour le suivi des joueurs, des stages et des compétitions. Éducateur sportif spécialisé en volleyball, Bertrand Olie a commencé sa carrière dans un club de la région lyonnaise. Fort de cette première expérience, et à la recherche d’un nouveau défi, ce dernier déménage en Angleterre en 2006 pour intégrer Volleyball England, la Fédération Anglaise de Volleyball. L’enjeu En 2014, la direction lui demande de prendre en charge le suivi des joueurs et des activités de la Fédération. Celle-ci compte 12 équipes nationales, organise 7 à 12 stages par an et participe à un certain nombre de compétitions. Le suivi s’effectuait à l’époque sur Excel et était synonyme de perte de temps, dispersion d’informations et utilisation de données inexactes ou obsolètes. Bertrand réussit à convaincre la direction d’investir dans la Workplace Innovation Platform FileMaker, qu’il avait connue dans le cadre de son précédent poste. Bertrand avait en effet travaillé avec des professeurs d’EPS qui utilisaient la plateforme pour gérer les informations de leurs élèves : contacts, rapports d’activités et bulletins scolaires. La solution Il y a un an, Bertrand se lance ainsi dans le développement d’une application personnalisée pour la gestion des informations des joueurs, des équipes, des stages et des compétitions. Cette dernière, qu’il nomme Talent Tracker, comprend les informations de plus de 500 joueurs, une cinquantaine de stages et une trentaine de compétitions. Bertrand y ajoute progressivement des données telles que les tests physiques des joueurs ou encore les résultats des compétitions. La Fédération bénéficie aujourd’hui d’une unique source d’informations et la gestion des joueurs et des activités s’en est trouvée améliorée. Lors de stages et compétitions en Angleterre ou à l’étranger, il est par exemple essentiel d’accéder rapidement aux informations de chaque joueur pour les transmettre aux entraîneurs et organisateurs : noms, contacts d’urgence ou encore contre-indications médicales. Aussi, en tant que Fédération nationale, Volleyball England doit produire des rapports à propos de certains programmes d’excellence. Ces rapports doivent par exemple inclure le nombre de joueurs de l’équipe nationale suivant tel ou tel programme, la date à laquelle ils les ont intégrés, ou encore le nombre d’entre-eux ayant par la suite rejoint un club national à l’étranger. La production de tels rapports a été facilitée grâce à l’utilisation de la plateforme FileMaker. Et le développement de Talent Tracker ne va pas s’arrêter là ! Bertrand souhaite en effet créer un portail en ligne afin de permettre aux entraîneurs nationaux d’accéder aux informations des joueurs et des prochaines compétitions, et de permettre aux joueurs d’y consulter leur profil, le retour de leur entraîneur ou encore les résultats de leurs tests physiques. Vous souhaitez vous aussi explorer les opportunités offertes par la plateforme FileMaker ? ➡️ Téléchargez notre version d’essai gratuite. Point, set et match ! was originally published in FileMaker Fr on Medium, where people are continuing the conversation by highlighting and responding to this story.
Afficher la totalité du billet

FileMaker, Inc

FileMaker, Inc

 

4 Ways You Can Streamline Business Processes with FileMaker

Your company’s profitability is tied to your efficiency. The more productive your business is, the more you’ll be able to do with the same amount of resources. Streamlining business processes is something that all successful companies are focused on right now. Thanks to advances in technology, companies can automate and reduce costs, simultaneously freeing [...] The post 4 Ways You Can Streamline Business Processes with FileMaker appeared first on The Scarpetta Group, Inc..
Afficher la totalité du billet
 

La saison des conférences

Bien plus que celle des feuilles mortes, octobre, est pour la communauté FileMaker la saison des conférences européennes. L’équipe de 1-more-thing était bien évidemment de la partie pour y assister et y contribuer en tant qu’orateur. Au FM Summit de Gand, Andries nous emmena à la découverte de la nouvelle fonctionnalité de la version 17 […] Cet article La saison des conférences est apparu en premier sur 1-more-thing.
>>> Lire la suite… <<<

fabriceN

fabriceN

 

FileMaker : la Workplace Innovation Platform…

Magalie l’a évoqué il y a un peu plus d’une semaine dans l’un de ses comptes rendus de la FM Conférence 2018 et vous-même, vous avez peut-être reçu un message de FileMaker France vous invitant à voir leur nouvelle petite vidéo pleine de fraîcheur et de gaité 😉 Bien entendu, il ne s’agit pas de […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

bBox for FileMaker v0.93 Now Available

We are pleased to release bBox version 0.93. bBox is a free utility plug-in to extend FileMaker solutions to easily use code libraries and macOS-based functions from Python, JavaScript, PHP, Ruby, AppleScript, Bash/sh, XPath, and SQLite. Included is a demo file that has over 210 examples of how you can put bBox functions to work for you. Bug Fixes: Fixed for 0.93 is […]
Afficher la totalité du billet

vincenzo

vincenzo

 

Truc n°88 – Une subtilité de FileMaker : valeurs et valeurs à mettre de côté…

Récemment, dans un script, j’avais besoin de définir une variable de script dans un paramètre de script. Jusque là, rien d’exceptionnel : c’est quelque chose que nous faisons régulièrement dans le développement de nos bases de données 😉 Mais la particularité de ce paramètre de script est qu’il possédait deux valeurs, et non pas une, […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Better Print Previews

When you think about printing these days, you probably think about saving the environment and just sending out the digital version. Of course, it turns out that many solutions still need to use the good old paper method and print something out. The great thing about having the data in a digital format beforehand is that you can preview the content before you actually hit that potentially wasteful print button. This video covers just a few of the possible methods for previewing content created for output. You may have already discovered how easy it is to simply take a user into Preview Mode and allow them to make whatever choices FileMaker provides, but, you'll now have more options available as you can easily use a Dialog or Card window in order to present a more customized view of the possible options a user may have. If you've struggled with automatically generating your printable reports as PDF files, and then injecting them into container fields, then you'll certainly love to learn from what this video has to offer! Click the title or link to this article to view the video.
Afficher la totalité du billet
 

Project Estimation Best Practices: A Look at Our Three-Point Estimator

One of the biggest risks in undertaking a big software development project is underestimating the time and effort involved from start to finish. Our team has provided estimates for hundreds of projects, and sometimes we’ve missed the mark, especially in the early days of our business. Over the years, we’ve put together a strong model for estimating how much time and effort a project is likely to require; our employees undergo annual training on the method. Using these methods ensures we present our clients with the most useful estimates possible and effectively set expectations for each project. Not Just Simple Math When you think of hours estimation, you probably imagine a small team of people putting together a list of tasks and then assigning hours to each. From there, it’s just simple addition, right? From the outside, I’m sure that’s what the estimation process seems like. Behind the scenes, however, things work much differently. Building Uncertainty Ranges No two projects are exactly the same. Even if you feel like you’re developing the same solution, there are too many variables at play to borrow from another experience to build your estimate. Comparing one project to another can be good for getting an order-of-magnitude or “ballpark”-level estimate. However, you wouldn’t want to make firm commitments based on just a rough comparison. Adding Non-Development Factors Not all of the effort in a project is spent by developers. Our project management team works hard to ensure communication remains open and transparent and keeps projects running smoothly. They need time to accomplish their tasks. Especially going into a new client relationship, no one knows how much time and effort that will take. Some of our clients appreciate a daily update email and have few questions. Others like detailed explanations on how things work behind the scenes. Projects also vary widely in how much support they need; for small projects with a single developer, a project manager may stay a little behind the scenes, making sure the developer has what she needs and sending periodic status updates. In larger projects with multiple developers, multiple client contacts, and a multi-step testing process, the project manager is heavily involved every day. He or she leads scrums and meetings, facilitates communication and monitors overall project risks. Besides project management, an estimate should include time for meetings, both internal and external, for quality assurance activities and for work necessary for deployment, to name some of the major non-coding categories. An estimate that fails to budget time for activities like testing, internal and external communication, and project management, may only come up slightly short for a smaller project. However, it will leave a major gap for a large effort. Foundation Phase Estimates If a project requires up-front design and discovery work (and most do), you also need to account for business analysis time. During our Foundation phase activities (also known in the industry as “discovery and design”), our business analysts work with clients to uncover their biggest challenges, opportunities, and goals and then build a plan to address the highest-value features and capabilities during solution development. As we wrap up design and discovery, our developers build a more accurate estimate of hours based on their lessons learned and the emerging solution blueprint. (In fact, we often provide mid-foundation in addition to post-foundation estimates to help put our clients at ease and promote the transparency required for successful projects. Each one gets more and more accurate and therefore encourages better client communication.) Consider Task Size When estimating items, smaller is definitely better. Most of us can’t reliably estimate pieces of effort that are bigger than a day or two in size. If your estimate has an item that says “manage invoicing, 20-50 hours,” you’re going to be well-served by breaking that into smaller units of functionality. This can include “Create Invoice,” “Print Invoice,” “View List of Invoices,” and so forth. If the project has several types of invoice, each with its own print format, then you can probably break “Print Invoice” into smaller items, one for each invoice type. If it’s too soon to break that item maybe it’s too soon to estimate it; or, if 20-50 hours “feels” right, just be aware that you’re estimating based partly on intuition. Make sure your estimate has a range that allows for the fact that there’s more definition yet to do. Number of Estimated Items The number of estimated items matters too. The fewer tasks you’re combining into an estimate, the less meaningful your estimate is. Nobody estimates items right on the nose. We’re either over or we’re under, for any given item. With a large number of items, we hope that the overs and the unders balance out. Too few items, and your estimate risks being derailed by a poor estimate for a single item. We abide by the rule of ten: estimates containing fewer than ten items are very dubious. However, the farther over 10 items you go, the more stable your math gets. For best results, try to have no fewer than twenty. Size of Estimate Ranges Just as important is for all of your estimate items to fit within a certain range of sizes. Huge disparities between your biggest and smallest estimate items suggest either that the small items have been broken down prematurely, or the big items are not yet broken down enough, adding uncertainty to your estimate and the project as a whole. As a rule of thumb, we try to have a range of no greater than 6x between the smallest and largest items in an estimate. Incomplete Tasks Lists Estimation is all about finding something to count; your estimate is only valid to the extent your list of work items is complete. If you’re missing 20% of your tasks, it doesn’t matter how good your estimates for the rest are. You can’t possibly know how many hours you will need for what’s not there. This is why our team prefers to make multiple estimates and only feels confident making commitments based on an end-of-foundation phase estimate. Once we’ve gone through a thorough foundation for a given body of work, we feel pretty confident that there are no major items that are completely missing from our list. Using the Right Tools To help our team estimate projects more effectively, we built a tool to put these ideas into practice. It uses some simple statistical math to create a master estimate out of a collection of work item estimates. These estimates could be generated by a single developer. Or, in a project with multiple people doing different kinds of work, the estimates could come from separate estimators. The tool can merge the estimates of multiple estimators. Just remember that, as with all estimation, the best estimates are created by the people who will actually do the work. We believe successful businesses are built on efficient solutions, so how could we not build one for ourselves? We call it our Three-Point Estimator. What is the Three-Point Estimator? To provide our clients with accurate estimates, we built a custom solution for our projects. It starts with a set of line items representing individual work items; usually, these are user stories, though occasionally they represent necessary technical tasks. Estimators give each item three different estimates. One number represents the “expected” or “most likely” case — if everything goes reasonably well it should take about this long. The other two numbers are a best case (if things go perfectly) and worst case (I can’t imagine it taking me longer than X). The algorithm then measures the span of this range. Wider ranges indicate more uncertainty in the estimate, while smaller ranges indicate more confidence. Finally, the algorithm combines the line items estimates into an overall estimate. Just like the individual line items, the overall estimate is a range. Generally, we don’t consider overly optimistic scenarios. We focus on project outcomes that, according to our tool, have a 60-90% chance of occurring. Sharing optimistic scenarios that only have a 1 in 3 chance of coming true, say, doesn’t serve the project well. Our final project estimate, therefore, considers not only the sum of the starting task estimate ranges but also factors in the uncertainty surrounding each item. This paints a clearer picture of what the project could require. Of course, we are always working toward more concrete numbers. The more work we do on a project, the closer we get to accurate numbers. This is why we often have a project-start estimate but provide a much tighter estimate following our Foundation phase. We’ve learned enough about the work through extensive conversations with the clients and end users to minimize uncertainty in our estimated ranges for hours of work required. Building Your Own Estimates During your project estimation, I recommend keeping these principles in mind: Your biggest risk is not in mis-estimating an item on your list — it’s in having no estimates at all for items that aren’t on the list, but should be. Good estimates start with lists of at least 20 distinct items. Estimated items shouldn’t vary too widely in size. Budget for non-development activities like meetings, interviews, project management, user acceptance testing, training. Then have a group meeting for a frank discussion around uncertainty in the project. Consider big gaps in estimates and what you need to know to reduce them. Then either track down that information or discuss and plan for best and worst case scenarios. Good luck with your next project estimate! Let us know if you have any questions in a comment below. The post Project Estimation Best Practices: A Look at Our Three-Point Estimator appeared first on Soliant Consulting.
Voir le billet d'origine
 

Des formateurs FileMaker toujours à jour…

Être un formateur FileMaker, c’est un vrai métier ! Tandis que la FM Conférence 2018 vient de fermer ses portes, voilà que tout cela me plonge dans une vaste méditation 😉 Mon point de départ ? Les compte-rendus de Magalie… Leur lecture m’a permis de toucher du doigt, une fois encore, que FileMaker ne cesse […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

FileMaker Conférence La Rochelle 2018 – Jour 3

Début de journée stimulante avec la présentation très originale de Joris Aarts (Clickworks) dont le nom était énigmatique à souhait « FileMaker chez les graphes ». Le sujet fut tout simplement passionnant et consistait en une introduction dans une technologie de base de données inhabituelle par rapport à ce avec quoi nous sommes familiers : les graphes avec comme outil Neo4j. […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Fiche Astuce n°132 – Créer une liste de valeurs dégressive dans FileMaker…

Choisir un item sans risque de doublon… Lorsque vous sélectionnez une personne pour une convocation à une date donnée, vous n’avez plus a priori besoin de la sélectionner par la suite… et donc, vous n’avez plus besoin de la trouver dans la liste des personnes à sélectionner ! Alors, vous rêvez d’une liste de valeurs […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

FileMaker Conférence La Rochelle 2018 – Jour 2

La journée a commencé avec deux présentations de FileMaker Inc., en anglais. La première, par Brad Freitag, concernait la vision stratégique à moyen et long terme et la seconde par James Qiu s’intéressait également à la vision à moyen et long terme mais plus dans ses aspects techniques. Puisque FileMaker ne rentre qu’imparfaitement dans tout un […]
Afficher la totalité du billet

MagalieJ

MagalieJ

 

Passing Script Parameters: A Complete Summary from Simple to Complex

What Are Script Parameters? Script parameters are one of many tools that all FileMaker developers should learn to utilize when developing custom FileMaker applications. Numerous benefits include writing fewer scripts, increased code reusability, and improved coding organization. By designing your scripts to pass parameters, you can use a single script with logic branching (i.e., IF, ELSE IF, ELSE) to perform multiple actions within your FileMaker solution. For example, you can create a Sales Order record in your FileMaker solution. You can create a Sales Order from a few different contexts in your solution, such as from a Customer record, from a previous Sales Order, or from a cancelled Order. Often there are similar requirements when creating a Sales Order from each of these contexts. Maybe you need to know the corresponding customer for this order, or maybe you need to know shipping address. By passing script parameters you can use a single script to create a Sales Order from various contexts without having to write and maintain a separate script. There are many ways to format and pass scripts parameters in FileMaker and in this blog post we are going to start from the beginning and work our way up to the various ways we can pass multiple script parameters. This blog post borrows heavily from Makah Encarnacao's FileMaker DevCon 2018 presentation, so be sure to check out her video, slides and example file for more details. Single Script Parameter FileMaker provides one primary method to pass script parameters into a script. This is done via the "Specify Script" dialog available throughout FileMaker. Adding a script parameter is done by simply typing into the "Optional script parameter" field at the bottom of the Specify Script dialog. Anything you type into this field will default to quoted text, unless FileMaker detects that you have entered a specific field or function. One can also click the "Edit..." button to the right of the "Optional script parameter" field, to open a calculation dialog and provide a more complex script parameter. In most of our Multiple Parameter examples, we will be using this calculation dialog to determine the parameters we will pass. Figure 1 - Optional Script Parameter Once we pass a single parameter through the "Optional script parameter" section, we can retrieve that value in our script using the Get(ScriptParameter) function. We will use this function throughout this blog post. Multiple Parameters with Return Delimited Lists Sometimes, one may find that a single script parameter is all they need to send to a script, but often, as we develop more complex solutions, we find the need to pass multiple parameters into our scripts to yield the desired result. The simplest way to send multiple script parameters is by using the pilcrow/return character (¶) or List () function to pass our script parameter. For example, in our Specify Calculation dialog we may enter the following parameters to pass information about a specific manufacturer in our solution: MNF__Manufacturer::Name & ¶ & MNF__Manufacturer::Headquarters & ¶ & MNF__Manufacturer::NetWorth & ¶ & MNF__Manufacturer::DateFounded This will allow us to pass four lines of data from a Manufacturer record to our script. Inside our script we can separate each of these four lines into their own local variables by using the GetValue() and specifying each line in it's own "Set Variable" script step as shown in Figure 2. Figure 2 - Pass parameters with a return delimited list This method of passing multiple script parameters does have potential drawbacks. For example, if any of the fields from a record that you pass as a parameter has a return character in it, used when passing an entire paragraph as a parameter, it can potentially throw off your "Set Variable" script steps. This is because line returns are preserved in a field as part of parameter passing. There are ways around this drawback by capturing those return characters and converting them to another less common character. It's also worth noting that the order of script parameters must match the variables that you set in the ensuing script steps. This can lead to the wrong data being set into the wrong field, in turn, leading to difficult to troubleshoot bugs. What other options do we have that may help prevent these shortcomings? Multiple Parameters with Pipe Delimited Lists By not using the return character, we can use other less common characters, like the Pipe character (|), to delimit our script parameters. In this coding example, we replace the ¶ character with the | character as seen below: MNF__Manufacturer::Name & "|" & MNF__Manufacturer::Headquarters & "|" & MNF__Manufacturer::NetWorth & "|" & MNF__Manufacturer::DateFounded With this method, we streamline the passing of parameters, but we need to use a few more functions on the variable declaration side to properly parse out the various values contained in our script parameter. It is fairly straightforward to get the first and last value from the script parameters using the Left() and Right() functions. These functions allow us to use the position of a specific pipe character to determine when we should start and end the character parsing. Here is an example of returning the first value in the script parameters: Left( $parameters; Position ( $parameters ; "|" ; 1 ; 1 ) -1 ) /*Subtract one because we don't want the pipe itself to be part of the name*/ As we can see, this technique is more advanced and would require an understanding of the Left (), Right(), Middle() and Position() functions to retrieve multiple parameters. However, every developer should learn to utilize these powerful functions within FileMaker,within their custom applications. We have other methods to pass multiple script parameters, many which are more elegant than using the Pipe delimiter. Multiple Parameters with Let Function The Let() function is a native FileMaker function that often is a mystery box for new developers. Using the Let() function, you can not only make your complex calculations more readable and modifiable, but can also declare local and global variables inside it. Therefore, we can use the Let() function to pass parameter values AND also the variable names! This is a super powerful function indeed! See the below example of passing multiple script parameters using the Let() function: "Let( [ $name = MNF__Manufacturer::Name; $headquarters = MNF__Manufacturer::Headquarters ; $netWorth = MNF__Manufacturer::NetWorth; $dateFounded = MNF__Manufacturer::DateFounded ]; $name )" In the above code, we are passing our Let() function inside quotes to preserve the coding until we want to evaluate the parameters inside it. The first part of the Let() function is contained with square brackets "[]" and is where we can declare the local variables for each value. Each line inside this declaration is separated by a semicolon. Think of the semicolon as the end of a sentence in a declaration. When this Let() function is passed with quotes, we are able to wait to declare our variables when we are inside our called script. We can have FileMaker analyze this Let() function be using the Evaluate() function. This simply takes the parameter passed to the function and evaluates the text inside it. We can pass simple mathematical equations or other functions, like we see in the example in Figure 3: Figure 3 - Pass parameters with the Let() function With one script step, we are able to create multiple local variables for our script! See how the Let() function is super powerful? Use it! There is a drawback about this method of script parameter passing. The parameter that you pass is pretty verbose, and the potential for typos is higher. Typing the wrong variable name in your Let() function can have unexpected consequences. Make sure to test your script with various parameters in this method. Multiple Parameters with Custom Function An alternative to the Let() function includes using a pair of custom functions to declare and then set your script parameters to local variables. This allows predefining your script parameters as variables but with a simpler syntax and fewer script steps by using the "#Assign()" custom function and its related custom function "#". Visit FileMakerStandards.org to learn about these custom functions in detail. Here is an example of how to pass script parameters using the "#" custom function: # ( "name" ; MNF__Manufacturer::Name) & # ( "headquarters" ; MNF__Manufacturer::Headquarters ) & # ( "netWorth" ; MNF__Manufacturer::NetWorth ) & # ( "dateFounded" ; MNF__Manufacturer::DateFounded ) This custom function uses "name-value" pairing. The value on the left side becomes your variable name in the ensuing script; the value on the right becomes your variable value in the script. Once we pass our parameters in this format, we simply call the "#Assign()" custom function with the Get(ScriptParameter) function, as shown in Figure 4: Figure 4 - Pass parameters with a name value pairs function The result of this is multiple variables based off the "name-value" pairing that we defined in our script parameter.
This method does require importing custom functions into your solution. It also requires careful entry of name values to ensure variables are used correctly in your script. However, overall, this method provides an elegant and speedy way of passing script parameters and setting your script local variables Multiple Parameters with JSON FileMaker introduced JSON functions natively in FileMaker Pro with version 16, but custom JSON functions have also been around for some time. JSON stands for JavaScript Object Notation. You can store data in a similar name-value pair, as described in our custom function option above. With JSON, we can use native FileMaker functions to pass multiple script parameters using the JSONSetElement() function. The added power with JSON is nesting related data inside a JSON object. Think of this as the ability to send not only data from the current record you are viewing in FileMaker, but also related data, such as order line items or customer contact records. This allows for larger sets of data transportation in the well know JSON data format. See this example of multiple data sets in a single script parameter declaration: JSONSetElement ( "" ; ["name" ; MNF__Manufacturer::Name; JSONString]; ["headquarters" ; MNF__Manufacturer::Headquarters; JSONString]; ["netWorth" ; MNF__Manufacturer::NetWorth; JSONNumber]; ["dateFounded" ; MNF__Manufacturer::DateFounded; JSONString]; ["relatedModels" ; JSONSetElement ( "" ; ["model[0].name" ; GetNthRecord ( MNF_MOD__Model::Name ; 1 ) ; JSONString]; ["model[1].name" ; GetNthRecord ( MNF_MOD__Model::Name ; 2 ) ; JSONString]; ["model[2].name" ; GetNthRecord ( MNF_MOD__Model::Name ; 3 ) ; JSONString]; ["model[3].name" ; GetNthRecord ( MNF_MOD__Model::Name ; 4 ) ; JSONString]; ["model[4].name" ; GetNthRecord ( MNF_MOD__Model::Name ; 5 ) ; JSONString]; ["model[0].body" ; GetNthRecord ( MNF_MOD__Model::BodyStyle ; 1 ) ; JSONString]; ["model[1].body" ; GetNthRecord ( MNF_MOD__Model::BodyStyle ; 2 ) ; JSONString]; ["model[2].body" ; GetNthRecord ( MNF_MOD__Model::BodyStyle ; 3 ) ; JSONString]; ["model[3].body" ; GetNthRecord ( MNF_MOD__Model::BodyStyle ; 4 ) ; JSONString]; ["model[4].body" ; GetNthRecord ( MNF_MOD__Model::BodyStyle ; 5 ) ; JSONString]; ["model[0].year" ; GetNthRecord ( MNF_MOD__Model::Year ; 1 ) ; JSONString]; ["model[1].year" ; GetNthRecord ( MNF_MOD__Model::Year ; 2 ) ; JSONString]; ["model[2].year" ; GetNthRecord ( MNF_MOD__Model::Year ; 3 ) ; JSONString]; ["model[3].year" ; GetNthRecord ( MNF_MOD__Model::Year ; 4 ) ; JSONString]; ["model[4].year" ; GetNthRecord ( MNF_MOD__Model::Year ; 5 ) ; JSONString] ); "" ] ) To set each script parameter as a variable, we can also use a custom function that works similar to #Assign () function but for the JSON format. Figure 5 showns an example using the JSONCreateVarsFromKeys () custom function: Figure 5 - Pass parameters using JSON If we don't want to use a custom function, we can use the JSONGetElement() function individually to grab each name-value pair. The custom function route takes very few lines of code, but the native function provides individual script steps that may aid in debugging. Another aspect to account for with using the native JSON functions is not all data types between JSON and FileMaker match up perfectly. For example, the date format that FileMaker uses is not directly supported in JSON, and we have to pass date values as a string. Here is a useful chart to see how each data type corresponds between the two formats: FileMaker Pro JSON Match Text String Number Number* Date String or Number Time String or Number Timestamp String or Number Container String Object Array Null Passing Containers Up to this point, we have described how to send parameters in some sort of text format, whether the data type is date, time, string or number. But what about binary data stored inside a FileMaker native container field? There are a few ways we can send container fields as a script parameter, and I will describe the drawbacks to each. The first method to transport container data via a script parameter is to use the native FileMaker Base64Encode() and Base64Decode() functions. The Base64Encode() function takes container data and converts it into a large block of text to make it easier to transport for script parameters or other data destinations. To reverse the Base64 encoding, use the Base64Decode() function to store back in it's native FileMaker data format. See this example of passing as Base64 encoded text: Base64Encode ( MNF__Manufacturer::Logo ) To reverse the process, we use the base64 decode function as shown in Figure 6: Figure 6 - Use the base64 decode function Unfortunately, some file metadata is lost in translation when Base64 encoding your container data, causing loss of important information in the encoding/decoding process. For example, a JPEG image going through this process loses information related to creation, modification, latitude, longitude, among other metadata. In some development situations, this is not an acceptable result. The alternative is to temporarily move the container field into a global container field. From there, set your destination field to the value stored in the global container. See an example of this shown in Figure 7: Figure 7 - Set the destination container to the global Conclusion As we can see, what started as a simple passing of one parameter to a script can be quite complex and varied. This should not dissuade one from using script parameters. Their benefits are numerous and can take your FileMaker development to the next level. By using script parameters, you can increase their development productivity and make it easier to streamline various functions within your database with less code. I hope that laying out the above options provides an informative matrix to navigate the possibilities that work best for your development practice and lead you to learn more about native and custom functions in FileMaker Pro. Have fun passing your parameters! Resource Makah Encarnacao's DevCon Presentation - FileMaker Community Questions? Leave a comment below or if you need help with your FileMaker solution, please contact our team. The post Passing Script Parameters: A Complete Summary from Simple to Complex appeared first on Soliant Consulting.
Voir le billet d'origine
 

FileMaker Conférence La Rochelle 2018 – Jour 1

Rendez-vous annuel des développeurs FileMaker, la conférence francophone organisée par Lesterius (que je remercie au passage, et plus particulièrement Olivier et Valérie Devriese), se déroule cette année à La Rochelle. Elle commence, comme l’an dernier, par une journée de formation intensive animée avec brio par David Julot accompagné cette année par Thomas De Smet, de Lesterius […]
Afficher la totalité du billet

MagalieJ

MagalieJ

×