3 Replies Latest reply on Oct 9, 2014 1:10 PM by philmodjunk

    Adding and accessing data supplemental to a field



      Adding and accessing data supplemental to a field


      Still on my recipe database….here's a fun one for someone to PLEASE HELP ME with…

      In a list of ingredients, i.e.

      2             small eggplant, sliced
      1 clove    garlic
      3             large eggs
      1 oz        paprika                 ……….(quantities are in fields separate from the ingredients)

      I'd like to allow the user to be able to append an ingredient with tidbits of information organized in a small group of INFO fields (including: About, Prep, Where to Buy, and Substitutes). That info could then be accessed (and updated if desired) at some later point in a subsequent (different) recipe by clicking on a button or popover button) when that same or similar ingredient re-appeared.

      The ingredients are listed (and input) as lines in a Portal (showing records from a Table called "Recipe_Data"), while the rest of the recipe (name, instructions, recipe category, photo, etc.) are in a Table called "Recipes." (The layout is based on the Table "Recipes".)

      Here's a scenario:

      In the example above, in a typical recipe, the user would list the ingredients as shown (the quantities, as noted, are in separate fields on the same line of the Portal).  

      The user clicks on a button on the Portal line adjacent to "small eggplant, sliced". In the Popover (or separate Window) that comes up, the user might enter "St. Lawrence Market" in Where to Buy and "zucchini" in Substitutes. **If it helps, the user could also be asked to add the "Key" ingredient "eggplant" to a field within the Popover/Window.

      Later, the user comes across a different recipe (or adds a new recipe) with the same ingredient (but probably a different line typed into the field in the Portal):

      3     large, very ripe eggplant

      Now the user can click on the button/popover and see the existing Where to Buy info and the Substitutes (plus any Prep info, etc, for "eggplant" that had been entered previously.

      Can this be done?

      ***And, in a PERFECT world, once info was present in one of these "INFO" fields for eggplant, the word "EGGPLANT" would change to, say, blue, in all previous and future recipes to alert the user that some info existed. (But this nicety is definitely optional!)

      Please explain so this Filemaker Pro neophyte can understand!

      (P.S. Don't try this recipe at home. I just made up the list of ingredients. Could taste awful!)

        • 1. Re: Adding and accessing data supplemental to a field

          Is this the basic data model?

          Recipe----<Recipe_Ingredients>------Ingredients    (----< means "One to many" )

          If so then you need to link additional "notes" records to records in Ingredients.


          By linking the notes to ingredients, you can access those notes from any recipe that lists the same ingredient. You'll likely need to add another Tutorial: What are Table Occurrences? of notes and link it in like this:


          Recipe::SelectedIngredientID = Notes|Selected::_fkIngredientID

          That way a regular button inside the portal to Recipe_Ingredients can set SelectedIngredientID to Recipe_Ingredients::_fkIngredientID before opening a popover placed outside the portal that contains a portal to Notes|Selected.

          You can't put the popover inside the portal as that would be putting a portal inside a portal and that doesn't work.

          What I'm describing is a bit more elaborate version of the technique found here: Need layout solution for nested portals...

          Caulkins Consulting, Home of Adventures In FileMaking

          • 2. Re: Adding and accessing data supplemental to a field

            Sorry, Phil, my mental block is firmly in place. I've attached a screen shot of my current table set up. Based on that, can you direct me / explain to me how to accomplish what's in your above post? 

            (And further to that, given that an "Ingredient_Line_Item" would be input such as I noted above: 'large, very ripe eggplant' , does your solution find notes for a further occurrence of just 'eggplant' in an Ingredient_Line_Item or will it require the entire entry?)

            Thanks for your patience.

            • 3. Re: Adding and accessing data supplemental to a field

              You need a table of ingredients to link by Ingredient ID to Recipe_Ingredients. Then your Notes_Ingred table can link to this new field that you do not currently have in your database.

              It might help to note the similarities between




              as is found in the invoices starter solution. Just as each invoice can list multiple items purchased on that invoice, a recipe lists multiple ingredients used for that recipe. Just as each product available for sale is listed once in Products, each ingredient used in one of your recipes would be listed exactly once in Ingredients.