Jump to content

Matt Leach

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Matt Leach

  • Rank
  • Birthday 03/16/1984

Profile Information

  • Gender
  • Location
    Spring Hill, FL

Contact Methods

  • MSN
  1. I understand why given that example. Im going to have to get more information from them to get a better idea of how they come up with the batch numbers, etc..
  2. That's pretty much the same idea. As far as why that table contains the BatchID, i do not know as this was in place before i started working on the project. The basic purpose of the layout is to compare, for a particular ingredient with a specific batch number, how many kgs were delivered vs. how many kgs were used in production
  3. It is a follow up of that thread but i figured since it was more of a relationship question i would post it here. There is a table called Goods_In which represents a shipment that was received. The shipment details get entered into this table, and each ingredient that is included in the shipment is entered as a line item into the Goods_In_Ingredient table.
  4. Im working on a recipe database and am coming up on the last phase of the project and am drawing a blank on how to accommodate the request. I need a layout to compare information from 2 tables. The tables are: 1. Goods_In_Ingredients 2. Production_Ingredients. Im not sure how to setup a relationship for this scenario or if it is even possible. Here is a bit of details outlining what i'm trying to do. I need to have 2 drops down lists on the layout. One for "Ingredients" and one for "Batch_Code". Based on what is selected from these drop downs, the following needs to happen: 1. All of the items in the Goods_In_Ingredients table that have the ingredient and batch code selected from the drop down need to be totaled up (based on an amount field for each record) 2. All of the items in the Production_Ingredients table that have the ingredient and batch code selected from the drop down need to be totaled up (based on an amount field for each record) Would i have to create a new table and create a relationship to these two tables somehow or could i just set the layout to reference one of the tables that already has a relationship to the other. I hope i was able to explain clearly enough as i'm going by what was provided to me. If it helps to clear up any confusion i can provide a copy of the file. Thanks
  5. Are you referring to this tread? http://fmforums.com/...evious-records/ --- Disregard, i found the sample file
  6. After reading through the forum you mentioned and playing around a bit, i think i'm about 90% there. I've setup the following script: Set Variable [$ProdID; Value:ProductionRecords::pk_Production_ID] Freeze Window GTRR [From table; "Recipe_LineItems"; Using layout: "Recipe_LineItems" (Recipe_LineItems)] Go To Record / Request / Page [First] Loop Set Variable [$Ingredient; Value:Recipe_LineItem::Ingredient_Name] Set Variable [$Amt; Value:Recipe_LineItem::Amount] Go To Layou ["Production_LineItem" (Production_LineITem)] New Record / Request Set Field [Production_LineItem::pk_Production_ID; $ProdID] Set Field [Production_LineItem::Ingredient_Name; $Ingredient] Set Field [Production_LineItem::Amount; $Amt] Commit Record GTRR [From table; "Recipe_LineItems"; Using layout: "Recipe_LineItems" (Recipe_LineItems)] Go To Record / Request / Page [Next, Exit after last] End Loop Go To Layout ["Production Records" (Production Records")] Refresh Window Lets say that i have 2 related records in the Recipe_LineItem table, it will create a record in the Production_LineItem table for the first ingredient, then it will create a record for the second ingredient until infinity unless i escape out of the script. I'm assuming that i need to somehow fine out the count of related items and then tell the script to look x amount of times or decrease the count after each loop but i'm not 100% sure how to move forward. Also, im pretty sure this is not the best way to accomplish this so any input on editing the script to work more efficiently would be appreciated as well. Thanks
  7. I will go through the post you referenced as it appears to be the same thing i am attempting to do. Thanks again, you're always very helpful and i appreciate it.
  8. Ive done some searches on copying records across tables but have been unable to do so successfully. Im working on a recipe database that has a few tables that are related: Recipes Recipe_LineItem ProductionRecords Production_LineItem My relationship is as follows: Recipe_LineItem --> Recipe <-- ProductionRecords <-- Production_LineItem A bit of information on the setup: The Recipe layout contains a field for recipe name and a portal to Recipe_LineItem. Each Recipe_LineItem is an ingredient for that recipe. The ProductionRecords database has a drop-down filed that contains a list of all the recipes from the Recipe table. There is also a portal to the Production_LineItem table. What i am trying to accomplish is on the ProductionRecords table, when a recipe is selected from the drop down menu, i would like to copy all of the ingredients (Recipe_LineItems) that are associated with the Recipe into the Production_LineItem portal (one line for each ingredient) What I'm assuming i need to do is an import from the Recipe_LineItem table into the Production_LineItem table but i am having a bit of trouble as to how to accomplish this. I would like to do this automatically once the recipe is selected so i thought about using a script trigger OnObjectModify. I attempted an import with the following script which i put together based on looking at other posts to no avail: If [ not IsEmpty ( ProductionRecords::Recipe )] Go to Layout ["Recipe_LineItem" (Recipe_LineItem)] Enter Find Mode [] Set Field [Recipe_LineItem::Recipe_ID; ProductionRecords::Recipe_ID] Perform Find Import Records ["database.fp7"; Add; Mac Roman] Go to Layout [original layout] End If Any assistance on where i am going wrong would be greatly appreciated. Thanks
  9. Unfortunately at this point it doesnt matter because they now want to go another direction on this layout. Thank you all for your input as it will help in future projects.
  10. Disregard. I took a look at it again this morning with a fresh mind and realized the Recipe_ID in the production record was not getting enetered which is why the portal was still empty. Thanks for your assistance.
  11. I've made sure that my relationships were set correctly and they match what you have provided above. My portal is set to show Related records from Recipe_LineItems when i click the drop down to select the recipe, the portal remains empty. Could the issue be that all 3 tables are related using the Recipe_ID field?
  12. I've recently started working on a database that was started by someone else but never finished so i'm trying to finish it. The database has one to many relationships and i am trying to setup a filtered portal based on a field and am having a little bit of difficulty. So far there are 3 tables involved all of which are linked by a field called recipe_id: Recipes Recipe_LineItems Production On the Recipe table / layout i have a recipe name field there is a portal that is linked to Recipe_LineItem table which allows the user to enter each ingredient for that recipe. That part is working great. The problem i am having is with the production table / layout. On this layout, i have a field that is a drop down where the user can select a recipe. There is also a portal on this layout which i would like to use to show all of the ingredients for the selected recipe in the filter but i am unsure how to go about this. I have attempted to set the portal filter to Recipe::RecipeName but that does not appear to work. Im pretty sure that's way off base but until now i have never done a filtered portal. Any help would be appreciated. Thanks
  13. I wish that were the case, i only have about 2 or 3 schedules setup on the server and they are all daily schedules. I've even deleted all schedules and re-entered and there is no change. I think at this point I only have 2 more options to try: 1. Change the time zone to pacific and then back to eastern to see if the server then works off the correct time zone. 2. Reinstall FMS. I hate having to do this especially since it's a 2 server deployment but may be my only option.
  14. I'm currently running FMSA11 and have a few server side scripts on a schedule. I attempted to setup a new schedule today and am having an issue with the Start / End times. The parameters i would like to setup are: Server side script to run daily every 15 minutes Start Time: 9:00AM End Time: 10:00PM When i attempt this time range, FileMaker states that the End Time needs to be after the Start time which it clearly is. For the mean time i compromised and set the End Time to 8:00PM and File Maker accepted that. When i save the changes and view the details for the schedule at the bottom of the Schedule window, it says: Repeat: Run everyday, every 15 miuntes 12:00PM - 11:00PM which is not what the script is set to. It appears as though FMS is reading in the times as PST instead of EST. This would make sense why FMS would not let me set 9:00AM - 10:00PM because it is trying to set it as PST. I checked the time/date settings on the server and it is set to Eastern Time. I've attached a screen shot so you can see both what is setup in the script and what the details show I've checked all my other server side scripts and they too appear to have the same issue. More information: FileMaker Server Advanced 2-Server deployment, both running Win Server 2k8 SP2
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.