merkaba22 Posted November 18, 2004 Posted November 18, 2004 Hey! I have two questions. Question 1: In a portal: line 1: Blue $100 line 2: Red $ 50. How can I create a total ($150) for the layout where the portal resides -- preferably outside the portal? Question 2: In a portal: line 1: 5) Process 1 line 2: 3) Process 1 How can I create only one line showing: line 1: 8) Process 1 Thank you!
QuinTech Posted November 18, 2004 Posted November 18, 2004 Hi, Merkaba. Say those $100 and $50 values are in the field Relationship1::Money. You can get the sum with a calc number field defined as ( Sum ( Relationship1::Money ) ). Make sure that Relationship1::Money is a number field. Similar approach for the second question; whatever that "x)" is must be in a number field. If it must be formatted this way, try making a number calc: Middle( ...thatField, ...Position( ......thatField, ......":", ......1, ......1 ...) + 1, ...3 ) This will return the 3 characters starting from right after the colon. You then might sum those like you did for the first question. HTH, J
merkaba22 Posted November 19, 2004 Author Posted November 19, 2004 I totally got the idea -- thank you! However, in trying to apply the principle ot the second example I realize that I have over simplified and seek to restate so I make sure how to implement you second suggestion (which, I am not sure I get yet - a poet and I don't know it ..) Here I go again: Question 2: In a portal: line 1: count2, Process1 (from field4, record5) line 6: count7, Process1 (from field8, record9) How can I create only one line showing: line 1: SUM (count2 + count7) Process1 Man .... should I do a calc field of some nature in the parent file for SUM (count2 + count7) Process1 and then show that in the portal? Sorry, I think this is a biggie ...
QuinTech Posted November 19, 2004 Posted November 19, 2004 Your portal will have the same fields on each line, regardless of what the data is, so i am not sure what you mean by "count2" and "count7." What is the name of the field that is displaying these numbers? And can you give us a few samples of the data this field displays?
merkaba22 Posted November 20, 2004 Author Posted November 20, 2004 The parent file has a series of line item possibilities (driven by a series of identical popup menus for each relative field) comprising a number field and an item field (process 1-9, for example), so that any one record could have any variety of items in their respective fields on any line on a record by record basis. For example, each record layout comprises number and item fields: Line1 = number1: item1 Line2 = number2: item2 Line3 = number3: item2 Consequently, this parent file could have 2 process1's entered on Line1 in the 5th record and 7 process1's entered on Line3 of the 9th record. In a portal: line 5: 2 Process1 (from record 5, Line1) line 9: 7 Process1 (from record9, Line3). I would prefer to see 9 Process1's (2+7 Process1) on one line, say, line 5 .... Does that clarify my mess?
QuinTech Posted November 21, 2004 Posted November 21, 2004 So you want to summarize the portal by process name? That is, total numberField when sorted by itemField? For clarity's sake, please also tell us the name of the relationship the portal is based on, and the names of the fields in that portal.
merkaba22 Posted November 21, 2004 Author Posted November 21, 2004 The relationship is; JobNumber:= :: JobNo Portal fields: JobNoCreationDate, number1, item1; number2, item2; number3, item3; number4, item4. Accordingly, there is a line in the portal for the date of a record and the info for the various processes made on that date ...
merkaba22 Posted November 30, 2004 Author Posted November 30, 2004 Yes, that's what I have now -- I am sorry I have not been clearer. What I need is the total of an item when it randomly appears in say item1 on one date and say item 2 on another date.
QuinTech Posted November 30, 2004 Posted November 30, 2004 Oh... sorry i missed this on 11/21. There may be workarounds for this, but i wouldn't recommend them. What you should do is re-design the file where process names appear (still don't know its name! ) so that process names can appear in only one field. Having the same type of data distributed to multiple fields in the same file (item1, item2, ...) makes summarizing them a bear. You may consider creating another file for Items, then relating that file to the file that currently contains the fields item1, item2... (that syntax would have been much less tortured had i known the name of the file! OK, i'll stop) and creating a calc field in that file that returns the name of the process from the related file. So your structure: FILES ----- Master Jobs LineItems FIELDS ------ Master::someRelatableField Jobs::relateToMaster Jobs::JobNumber Jobs::SelectItemName (text field) Jobs::JobNumberItemName (calc text field equal to (JobNumber & SelectItemName)) LineItems::JobNumber LineItems::ItemName LineItems::JobNumberItemName (calc text field equal to (JobNumber & ItemName)) RELATIONSHIPS ------------- Master::someRelatableField <==> Jobs::relateToMaster Jobs::JobNumber <==> LineItems::JobNumber Jobs::JobNumberItemName <==> LineItems::JobNumberItemName Once you've done this, you can use that final relationship to get the count you're looking for. J
Recommended Posts
This topic is 7299 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