Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Synchronize Fields


Recommended Posts

I am 98% done with my Filemaker solution and have two problems. I am creating a weekly menu planner that involves two fields, the recipe, and the ingredients. I made my recipe field a pop up menu to choose which one I want and I would like the ingredient field to reflect the ingredients of my recipe choice. I do not know how to sync that. Lastly, when I create a recipe field for each day of the week and I choose a recipe for one day, it shows up in all the fields. I can't figure out how to choose different recipes for each day. Thanks so much for any help that can be offered.

Link to comment
Share on other sites

I'm having a tough time understanding your description, but what I think you want to do is to Define Value List using the field that has your recipe name. (You may want to define an extra field for your pop-up or drop-down menu.) Then when the user chooses that menu item and click FIND, you simply search for that recipe name.


One problem you might face with such a simple mechanism is that selecting 'rice' would also pick up 'rice pudding', 'fried rice', and 'rice krispies'.


As far as a recipe of the day, and assuming you don't want a randomized selection, you would have to choose a base date, say 1 Jan 2000. Subract the base date from today's date (to get the number of days since 1 Jan 2000) and divide that by the total number of your recipies (number of records presumably). The resulting number would be your recipe number.





Now, if you want some fun and you know the total number of ingredients, add some fields to your database for ingredient, units, and numeric value. (Personally, I would find repeating fields easiest here, but many people get confused by repeating fields.) In other words, for biscuits, you'd fill these 3 fields (or repeating fields) with flour C 2, for 2 cups of flour.


Also, add a numeric field for number of people served.


Once you have that in place and stuff your ingredients into the fields, if your recipe says it will serve 4, you can then calculate the amount of ingredients for 9 people.


If you want to go international and not just limit yourself to the US, add a binary (or whatever) field to select English versus metric units, and then recalculate to liters and grams if someone from Italy wants to try your pancakes. That said, many foreign recipes often use weight for dry measure instead of volume, so ideally you might choose to show both side-by-side.


However, before you do any of the fancy stuff, you need to solidify your feel for FM with experience, just what you're doing now. If you have ingredients of 1000 recipes in a free-form field, you'd feel daunted by manually copying the data to the individual fields. However, it's quite possible that your fields could be parsed by a combination of FM calculated fields and scripts and popped into the fields automatically, but that would be way down the road.


I'm probably overwhelming you with blue-sky techno-crap, so it's probably best if you ignore everything below the line for now.

Link to comment
Share on other sites

To get an ingredient list by selecting a recipe is a simple portal setup.


Create a table called 'ingredients' including a field identifying the recipe name (call this field 'recipeName') and a field with the list of ingredients ('ingredientList').


Create a relationship between your menu planner table and ingredients with recipeName as the matching field. Create the pop-up list field on the planner layout using a value list comprised of values from the field ingredients::recipeName. In the planner layout, place a portal using this relationship which contains the ingredientList field.


When you select the recipe name, the ingredientList field will automatically display the ingredient list associated with that recipe.


As for the different recipes for different days, create a field called dailyRecipe as a pop-up list, using the recipeName value list described above, and having 7 repetitions. You can select each day's field independently and select a different recipe for each one.

Link to comment
Share on other sites

Thank you both very much. The information was just what I needed and I will be putting it to work. I appreciate you taking the time to answer.

Link to comment
Share on other sites

Actually, you don't even need the portal in the planner layout as I suggest above. Simply setting your ingredients field to use the ingredients::ingredientList field definition will result in the automatic population of that field with the list of ingredients for whatever recipeName you select.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

Terms of Use