Category: Blog

  • CustomList et alternatives proposées par FileMaker 11

    CustomList et alternatives proposées par FileMaker 11

    Travailler sur des séries de données, constituer des listes… CustomList est l’outil indispensable. Souvent perçue comme difficile à mettre en œuvre, cette fonction personnalisée d’Agnès Barouh offre pourtant une puissance de traitement qui justifie pleinement son apprentissage.

    Dans cette vidéo, nous tachons de comprendre la logique de fonctionnement de CustomList et d’apprendre à ne plus en avoir peur.

    Nous verrons également comment FileMaker 11 nous propose d’autres méthodes pour boucler à travers des enregistrements, et donc d’accomplir une partie de ce que permet CustomList.

    Le “Coin FileMaker” d’Agnès Barouh.

    Télécharger

  • 10 FileMaker 10 Techniques

    10 FileMaker 10 Techniques

    At first glance, FileMaker 10 is mostly about a new interface and a new toolbar. But FileMaker 10 also introduces outstanding improvements for developers. Download these examples and see how the new features will change the way you develop. Radically.

    These files were presented at the Paris FM Conférence 2009.by Fabrice Nordmann, founder of 1-more-thing.

    They were improved in order to be more easily portable to your solutions.

    Type Ahead shows how a user can dynamically filter data while typing, whether data is displayed in a portal or in a list view.

    Download

    Field Length Control demonstrates the ability to control the authorised input length in a field. The user doesn’t need to exit the field in order to get feed-back.

    Download

    Password Style Field shows how you can now use a simple field for password input, without using a custom dialog.

    Download

    Tab Control illustrates how script triggers allow you to control tab panels elegantly.
    Download

    Field As Button allows you to use a field as a button. Thanks to script triggers, you can shorten the script parameters and avoid the ’video inverse’ effect.

    Download

    Single Value List or how to simplify value lists management with FileMaker 10. In this example you’ll see how with one defined value list, you can display as many as you want, including conditional lists!

    Download

    Field Name Calculations is the first of a serie about ’working with field names’. Here is how your calculations can become proper functions, of which result will vary depending on the field that contains them.

    Download

    Interdependent Fields shows how hard-coding has become unnecessary in your calculations. Here we do a simple unit conversion (inches/centimiters) with 3 different techniques to illustrate the improvements.

    Download

    Save/Restore Finds. Add the ability to store and restore a find to your solutions. Beyond the new native FileMaker 10 feature called Saved Finds, this technique shows how you can create a record for each saved find. Would you like to share a find with another user, or control precisely in which context you want to see a find… this technique is for you. It is comparable to Mac OS X/Mail.app/iTunes Smart Folders: do a find once, redo it as many times as you like.

    Download

    Field Map. Finally, the best one. Work-around issues related to import orders in FileMaker. This technique allows you to map the field import using… the relationship graph!

    Download
  • 10 Techniques pour FileMaker 10

    10 Techniques pour FileMaker 10

    Au delà de la très visible nouvelle barre d’outils, FileMaker 10 introduit de vraies révolutions pour les développeurs. Téléchargez ces fichiers-exemple et voyez comment ces nouveautés peuvent modifier votre manière de développer.

    Ces fichiers de démo constituent des versions améliorées des exemples présentés par Fabrice Nordmann, fondateur de 1‑more‑thing, lors de la FM Conférence 2009. à Paris.

    Ils sont développés dans l’idée d’être facilement portable vers vos applications.

    Type Ahead montre comment, au fur et à mesure que l’utilisateur tape au clavier, il peut filtrer une liste, soit dans une table externe (portal), soit en vue liste.

    Téléchager

    Field Length Control illustre la possibilité de contrôler par l’interface la longueur autorisée dans une rubrique. L’utilisateur n’a plus besoin de sortir de la rubrique pour savoir s’il a correctement saisi.

     

    [fruitful_btn link=”https://www.1-more-thing.com/wp-content/uploads/2015/04/1MT_FieldLengthControl.zip”]Name “button”[/fruitful_btn]

    Télécharger

    Password Style Field (rubrique mot de passe) explique comment vous pouvez désormais proposer la saisie d’un mot de passe directement dans une rubrique, sans passer par une boîte de dialogue.

    Télécharger

    Tab Control montre comment les déclencheurs de scripts vous permettent de manipuler les onglets et d’en contrôler l’accès.
    Télécharger

    Field As Button vous permet d’utiliser une rubrique comme bouton. Grâce aux déclencheurs de scripts, limitez au maximum les paramètres à envoyer au script, et évitez l’effet “vidéo inverse”.

    Télécharger

    Single Value List ou comment simplifier, grâce à FileMaker 10, la gestion des listes de valeurs. Dans cet exemple, vous verrez comment avec une seule liste de valeurs, on peut en proposer autant que l’on veut à l’utilisateur, y compris des listes conditionnelles !

    Télécharger

    Field Name Calculations entame une série de fichiers qui exploitent la possibilité de travailler avec le nom des rubriques. Voyez ici comment vous pouvez faire de vos calculs de véritables fonctions, dont le résultat dépend du nom de la rubrique qui les contient.

    Télécharger

    Interdependent Fields (rubriques interdépendantes) illustre encore une fois le travail avec les noms de rubriques. Plus besoin de coder en dur (hard-coding) le nom des rubriques dans vos calculs.

    Télécharger

    Save/Restore Finds. Intégrez à vos solution la possibilité de mémoriser une recherche. Au delà de la nouvelle fonctionnalité de FileMaker 10 qui permet à chaque compte utilisateur de mémoriser une recherche, cette technique facilement intégrable vous permet de créer un enregistrement pour chaque recherche, et de la nommer. Vous pouvez ainsi envisager de partager des recherches entre plusieurs utilisateurs ou de décider du contexte dans lequel vous voulez l’autoriser à ré-effectuer cette recherche. La technique s’apparente aux Smart Folders (dossiers intelligents) de Mac OS X ou Mail.app.

    Télécharger

    Field Map. Le meilleur pour la fin : contournez les difficultés liées aux imports de fichiers FileMaker. Cette technique vous permet de définir vos ordre d’importation avec… le graphique de liens !

    Télécharger
  • FileMaker : Avoid “Hard-coding”

    One of the nicest things with FileMaker is how free we are to rename things at any time. No matter if a field is used in a calculation or a script, you can rename it and FileMaker will update all dependencies instantly.

    When I try to remember the reasons why I chose FileMaker among the available development tools, I think this one is in the top 5.

    It happens though that you need to hard-code things, that is to say quote an item name such as a field name or a value list.

    For example, to define an auto-enter calculation depending on active field name, you’ll have to write:

    1. Case ( Get ( ActiveFieldName ) = "myFieldName" ; A ; B )

    another well known example is

    2. ValueListItems ( Get ( fileName ) ; "myValueListName" ) 

    This is due to the lack of functions giving information on database structure. One can’t replace expression 1 with

    1b. Case ( Get ( ActiveFieldName ) = theNameOfTheFieldThisCalculationIsDefinedFor ; A ; B )[[EDIT: since this article was first written, FileMaker launched FileMaker Pro 10, which makes this example an old story]The GetFieldName function now allows this]

    or expression 2 with

    ValueListItems ( Get ( fileName ) ; theListOfMyClients )

    With generalization of techniques such as plug-ins to trigger scripts (zippScript, DoScript…) that call a script by its name, or LayoutProperties that call layouts by their name… this problem becomes more crucial. Not to mention the PHP API that forces us to hard code everything. This article won’t solve this case, but the equivalent technique could be developed for the php side.

    But before that. What is really the problem?

    Mainly, referring to a database structure item as a text constant in an expression prevents from renaming this item, unless you investigate the whole DDR (Database Design Report) before renaming anything.

    Let’s take a layout called “Customers_list” and a script that goes to this layout using the Go To Layout [ Name by calculation ] option.

    Imagine that during the development process this layout becomes a table view. You accurately rename it “Customers_table”. Of course the script is not going to work anymore. (note: in this article, we agree to consider that a script that doesn’t work anymore is not something we want 😉

    With time spent on your solution and its increasing complexity, you end up with many items that are not named accurately because you don’t dare renaming them, and you can’t find your way in your naming (not to mention your colleagues or your clients). You might also waste long hours working on a faulty calculation, and finally realize you had just made a typo in the text string. (If you are the one who never ran into this situation, please do not tell me: my only consolation in these cases is to think that probably other guys are as stupid as I am)

    At this point, if I did my job correctly and even if you had never felt that there might be an issue with renaming, you should now feel a great anxiety and I’m sure you are wondering what items in your solution you should never rename.

    No need to thank me. That was for free.

    So here comes the technique we now use to avoid this problem.

    It requires a custom function, available on FMfunctions.com

    FM_Name_ID ( _Name_ID ; _TLFSV ; _fileName ; _layoutName )

    Let’s start with describing this function. We’ll see how and why use it after.

    Parameters are:

    • _Name_ID: can be given an item name or its ID. For example, let’s send our layout “Customers_list” (for now, we know only its name)
    • _TLFSV: the type of item you are working with. It can be:
      • “Table” or “T” : a table occurrence
      • “Layout” or “L” : a layout
      • “Field” or “F” : a field
      • “Script” or “S” : a script
      • “ValueList” or “V” : a value list
    • _fileName: the name of the file in which this item is. If this parameter remains empty (“”), it will mean current file (Get ( FileName ))
    • _layoutName: this parameter should be filled only if type is Field. Again, an empty parameter means current layout. (Note: as in FileMaker Design functions, this parameter can take a table occurrence name rather that a layout name)

    Let’s now see what this function gives for our Customers_list layout:

    FM_Name_ID ( "Customers_list" ; "L" ; "" ; "" )

    Result is 121. Doesn’t it work at yours? do you get 63? This is normal! The ID of the layout is 121 here on my file, but it can perfectly have a different ID on yours. But it is an ID, which means that unlike the layout name, it will never change. The day you rename it “Customers_table”, it will still have the same ID.

    So now in my script, instead of using Go To Layout [ name by calculation ], I just have to use Go To Layout [ ID by calculation ], and that’s all!

    … well, it would be all if such an option would exist…

    Fortunately, the same custom function is going to save us, because it works the other way around too!

    I now know the layout ID: 121, what I’ll do is use the old Go To Layout [ name by calculation ], and I’ll define this calculation as:

    FM_Name_ID ( 121 ; "L" ; "" ; "" )

    And the result is… “Customers_list”, of course!

    And when I’ll rename the layout, the result will be “Customers_table”. So the script will keep working!

    Some will certainly point out that FM_Name_ID ( 121 ; “L” ; “” ; “” ) is not really nice to read.

    And they are not entirely wrong…

    As usual, I would recommend to comment as much as you can:

    FM_Name_ID ( 121 ; "L" ; "" ; "" )  // Customers_list

    and when you rename the layout, only the comment is not accurate, which is not as critical as the expression result.

    Some others would say that all this takes time. Here are some tips to maker it even easier.

    • keep in the Data Viewer the expressions that allow you to get current script and current layout IDs)
    • store the item IDs so you don’t have to look twice for the same information. So where to store them… well, in the item name, now that you can rename it freely! A script that is called by a plug-in can be called MyScriptName_344 (344 being its ID)

    I admit it is not very nice for fields (Name_364 and InvoiceTotal_857 are not nice to work with), so you can use the field comment area.

    After some time using this technique for a while, I’m sure you’ll wonder, like me, why you haven’t used it for years.

    What the web says