jder30 Posted October 29, 2008 Share Posted October 29, 2008 Hello, I have been using FileMaker Pro since version 6, and now using version 9.03. My question concerns using multiple portals on one layout and from the same table. I am using a relational database Payitems--workorderlog----entryform Heres my setup: I have place a portal with 1-20 rows on the top half of the entry form and a portal with 1-6 rows on the bottom have of the form. The data is being pulled from the same table; in this case, "work order log" The pay items contains the labor cost and material cost which automatically populates the line items of the workorder log and entry form Within the workorder log I have material line- item fields and labor line-item fields. The main entry form contains the two portals that gets populated with information form the workorder log; cost, units, etc. The labor items are populated within the first portal; with rows 1-20 The second portal rows gets populated with the material line items; cost, units, etc. based on the key between the tables. Evrything calculates, except when the portal on the top of the entry form uses more than two rows. The botom portal rows starts to add blank rows and vice versa for the bottom portal, and I also lose the data that I was already using inside the portal row. Keep in mind the data is being pulled off one table. I have tried splitting the data into two tables, but I had a problem getting FMpro to add up the total; summary_fields. Is there anway to have a combined summry of each portal for? Link to comment Share on other sites More sharing options...
Ocean West Posted October 29, 2008 Share Posted October 29, 2008 This is because you need a "type" designator for each set of data in to be contained in the portal row. So that the top portal only shows a certain "type" of records, the same being true for the second portal. Using a multi predicate relationship from the parent to the child table, and two constant type fields in the parent table one for "labor" one for "material". Labor Relationship KEY --- labor -- Material Relationship KEY --- material -- Items Relationship KEY --- Then a third relationship only by the unique key if you wish to go to "ALL related" you could use this if you want to go to (all) related records and print them, and you could use the SUM command and get totals - or just use the sum function on the individual relationships and add them together. Link to comment Share on other sites More sharing options...
jder30 Posted October 30, 2008 Author Share Posted October 30, 2008 (edited) Stephen, Would I need to add a category field within the portal row? category_labor and category_materials And also is it possible to split the portals rows by changing the initial row numbers 1-20 labor line items and rows 21-26 Material line items Thanks for your help!! Edited October 30, 2008 by Guest Link to comment Share on other sites More sharing options...
Ocean West Posted October 30, 2008 Share Posted October 30, 2008 I would recommend not relying on position in the portal to determine "type" however you could sort he portal by type, but things will shift around - visually distracting if you just entered something and have to rescan to see it. Splitting rows is not what the starting portal row number is for, you will never see rows 21+ until the first 20 rows exist. Stick with two separate portals 2 different relationships portals.fp7.zip Link to comment Share on other sites More sharing options...
jder30 Posted October 30, 2008 Author Share Posted October 30, 2008 (edited) Thanks a bunch! I got it to work now the only issue I am having is when I create a summary report. I created a summary field which gives me a summary of material total and a summary field which gives me the lanor total I noticed when I try to combine the summary totals, I tried the GetSummary script but the calculated results is still a little off. Its as though the total results is only seeing one line item from the oppisite table. I heard that summary fields cannot be a part of a calculation across two tables? What is the work around for this? I am trying to produce a report that shows thats material and labor totals combinded Edited October 30, 2008 by Guest Link to comment Share on other sites More sharing options...
jder30 Posted October 31, 2008 Author Share Posted October 31, 2008 Ok guys I have gotten to a point where everything is working on the frontend (entry form). Now I am frustrated because I am creating a summary report that gives me a total cost of materials for each workorder found, and total cost of labor for each order found. Problem: I cant seem to get the summary report totals to combine and give me a grand total. Does anyone have any examples of the getSummary script that will combine totals from summary results. BTW, the sub-summary are being pulled from two diffrent tables Materials and labor. You help is much appreciated! Link to comment Share on other sites More sharing options...
Ocean West Posted October 31, 2008 Share Posted October 31, 2008 here is the revision that generates a summary report Link to comment Share on other sites More sharing options...
jder30 Posted October 31, 2008 Author Share Posted October 31, 2008 Thanks! I am not sure if you meant to include a file or link to the "latest revision" Link to comment Share on other sites More sharing options...
Ocean West Posted October 31, 2008 Share Posted October 31, 2008 :oops: try again portals.fp7.zip Link to comment Share on other sites More sharing options...
jder30 Posted October 31, 2008 Author Share Posted October 31, 2008 (edited) Got it! From what I can tell so far, is making sure that I add a record type category. This made a big difference in in how my portals behave. Thanks a bunch!! Edited October 31, 2008 by Guest Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5794 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now