Jump to content

Matt Leach

Members
  • Posts

    142
  • Joined

  • Last visited

Everything posted by Matt Leach

  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 11.0.3.309 2-Server deployment, both running Win Server 2k8 SP2
  15. Thanks for the input guys, i will give your suggestions a shot and go from there. Thank again
  16. Thank you for your response. I was afraid of that. My files are currently hosted on FMS Advanced This is my first time working with globals so please excuse my ignorance. Would it be possible (as a workaround) to store the images in a network location that everyone already has access to and store a reference to the images
  17. Hello all, I'm attempting to create a navigation menu that i can use in my layouts for the first time and am having some difficulty which i hope is just an oversight on my part . I found the following article online on how to create a basic menu and have been using it as a reference: http://digitalfusion.co.nz/weetbicks/build-a-navigation-system-part-one--starting-out-simple/37/ I have a table (navigation) with 3 repeating fields: Icons - Container [7] - Global Labels - Text [7] - Global Layouts - Text [7] - Global I've created a new record in this table and placed 7 images into the Icons fields, added a label for each and 7 layout references. I made sure that the box was unchecked to "store only a reference to the file" as this database will be viewed by several computers. I then placed the fields onto my main layout and everything works fine. The issue is that once i close the file and re-open it, the record i created in the navigation table is gone along with all the images, labels and layout references. Seems the only way to keep the record from disappearing to to leave the file open. Is there something that i am missing or doing wrong? Thanks
  18. Thanks for the reply, i'll give that a shot.
  19. I'm assisting a local bicycle organization with a database that cyclists use to track their total mileage. Im having some troubles summarizing the mileage. Everyday, the rider enters information into 2 key fields: Miles = total number of miles for the day RideType = type of ride they did (Commute, Trail Riding, Off Road, etc...) I would like to have the ability to break down the total miles of each ride type. Currently i have one summary field that gives total miles no matter what type it is but would like a field for: TotalCommuteMiles TotalTrailMiles and so on.... Would i set the field as a calculation and perform an IF statement based on the ride type? Any assistance would be greatly appreciated. Thanks
  20. i knew it had to be something simple, i completely overlooked the slashes. Ill just do a substitution and ill be all set. Thanks for the quick reply.
  21. Im having a bit of difficulty with a project i am working on. I've taken a spreadsheet with variouls fields in it and have created a new database based on the spreadsheet. One of the fields is PointerToSource and contains the path to the image that i would like to insert into my container field (field name is image) I've setup the following script: Set Variable [$file; Value:test_import::PointertoSource] Go to Field [test_import::image] Insert Picture ["imagewin:/$file"] When i run this script, i am presented with the following error: The File (path to the file) could not be found and is required to complete this operation. The path for this particular record is C:\Temp\GalacTek\_obj_8_D27\_obj_8_D27_224.TIF If i manually browse to the path, the file is there and viewable. Any ideas as to why i am unable to insert the picture?
  22. Just a follow up, i think i may have come to a solution by setting the Maint_Status field as a calculation field using the following calculation: Case ( SW PD 2 < Get ( CurrentDate ) and Get ( CurrentDate ) < Date(Month(SW PD 2)+2;1;Year(SW PD 2)); "GRACE PERIOD!"; SW PD 2 < Get ( CurrentDate ) and Get ( CurrentDate ) ≥ Date(Month(SW PD 2)+2;1;Year(SW PD 2)); "OFF MAINTENANCE!"; )
  23. I guess im still not being clear on how this works. I understand this most likely is not the best way to handle the situation, i would love nothing more than to change it but this is how our old software works and our accounting dept (who this is mainly for) is dead set against change. Our clients pay for support on a yearly or quarterly basis. The SW PD 2 field contains the date that the client is currently paid through. The Maint_Status field contains the current status of the client. Lets say that the SW PD 2 date is set for 1/31/2011. If the client does not make any payments leading up to or after 1/31/2011, then are put in a grace period. This period is for one month following the date in the SW PD 2 field, so using this example, they would be on a grace period until 2/28/2011 and the Maint_Status field would be marked "GRACE PERIOD". If by 2/28/2011 no payment is made, the Maint_Status field would be changed from "GRACE PERIOD" to "OFF MAINTENANCE". Lets use the same example of SW PD 2 date of 1/31/2011. If the client calls up before or even after 1/31/2011 and makes a payment for the year, the date in the SW PD 2 field would be changed from 1/31/2011 to 1/31/2012 and the Maint_Status field would remain empty or be changed from "GRACE PERIOD" to empty. Obviously, if the payment was for a quarter, the SW PD 2 date would be changed to 3 months forward.
  24. Hopefully i can clarify a little. Lets say that the SW PD 2 date is 12/31/2010. From 1/1/2011 - 1/31/2011, the client is in a "Grace Period" as noted in the record Once 2/1/2011 is reached, if the SW PD 2 date has not been changed (i.e., the client hasnt paid) then the record is marked Off Maintenance. If the SW PD 2 date is 1/31/2011 2/1/2011 - 2/28/2011 would be the grace period and so on.. Hope that clarifies my intentions.
×
×
  • Create New...

Important Information

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