mleiser Posted June 14, 2011 Posted June 14, 2011 Is there a way to create a portal that has fields in a row rather than down? I have parents and I have students. I am creating address labels for each parent but I want to insert the student names on the bottom line of the label. The portal only goes down, one line per name, I want to go across name/grade - name/grade - etc. Any ideas. Ex. Mr. and Mrs John Doe 1111 1st Street Anytown, NY 11111 John 2nd, Bill 4th, Jane 2nd Mike
bcooney Posted June 14, 2011 Posted June 14, 2011 Your example doesn't really require portals across. If you created a calc field in your child table (the portal's table) that is: FullAddress_c & "¶" & Substitute ( List (childInfo); "¶" ; ", " ) you'd end up with your example. Where is the child info in your structure. Is there a related table that has Child Name and Grade?
mleiser Posted June 15, 2011 Author Posted June 15, 2011 Your example doesn't really require portals across. If you created a calc field in your child table (the portal's table) that is: FullAddress_c & "¶" & Substitute ( List (childInfo); "¶" ; ", " ) you'd end up with your example. Where is the child info in your structure. Is there a related table that has Child Name and Grade? I have a parent file and a student file. The parent file has a parentID that relates to parentID in the student file. The name and address are in the parent record, the child name and grade in each child record related to the parent. Now what do I do. And thanks for your help. Mike
bcooney Posted June 15, 2011 Posted June 15, 2011 If your goal is to list the parent info in the portal with their child info at the end, like your example, then: 1. Create a calc field in the Student file, dsp_ChildIInfo = FullName & " " & Grade. 2. Create a calc field in the Parent, ChildrenList = Substitute ( List (relationship::dsp_ChildInfo) ; "¶" ; ", " ) 3. Create another calc field in the Parent, AddrwChild, that is the FullAddress & "¶" & ChildrenList This last field, AddrwChild, is what you use. I'm confused however, where's the portal? You're doing address labels. Why aren't you using a label setup? Just place this AddrwChild field on the label layout.
mleiser Posted June 15, 2011 Author Posted June 15, 2011 If your goal is to list the parent info in the portal with their child info at the end, like your example, then: 1. Create a calc field in the Student file, dsp_ChildIInfo = FullName & " " & Grade. 2. Create a calc field in the Parent, ChildrenList = Substitute ( List (relationship::dsp_ChildInfo) ; "¶" ; ", " ) 3. Create another calc field in the Parent, AddrwChild, that is the FullAddress & "¶" & ChildrenList This last field, AddrwChild, is what you use. I'm confused however, where's the portal? You're doing address labels. Why aren't you using a label setup? Just place this AddrwChild field on the label layout. This is a label and I am just putting it on the label. I used your method and it worked great! Thanks so much.
mleiser Posted July 6, 2011 Author Posted July 6, 2011 OK. That solution worked great. Now I need a little bit of a twist on it. Two issues. One, can I replace the paragraph with a tab instead of with a comma? How?Second, I have, say, ten courses for a student. I have the student record and a related grades file. Each of the students will have 10 grades records, each one containing the course name and grade. Some students may not have a grade in a particular course. However, the 10 records for the courses are still there. I am trying to use this method to get a horizontal list (replace the paragraph sign with a tab instead of a comma) showing the grades for each of the ten courses, as well as blanks for missing grades, so I have 10 grades (or blank for a grade). The ultimate objective is to get a chart of each course grade going across, each student name going down. The 10 records would also have to be sorted to make sure the grades are in the right spot within the ten. In the heading I would have another list of course names. It should all match. So... I don't know how to get the tab in there, how to sort the ten records, and how to get empty fields showing if no grade. This make any sense? Mike
bcooney Posted July 6, 2011 Posted July 6, 2011 Somewhat, but it sounds like you're trapped in an Excel paradigm. Filemaker thinks vertically, not horizontally. I feel what you need is a sub-summary report, by student. Design this report from your grades table. See this blog.
mleiser Posted July 6, 2011 Author Posted July 6, 2011 Just had another idea. Can I bring a list from my grades file into a repeating field in my student table? Then it would work out perfectly. Now I bring the list into a single field.
comment Posted July 7, 2011 Posted July 7, 2011 Try a repeating calculation field (in the Students table) = GetNthRecord ( Extend ( Grades::Grade ) ; Get ( CalculationRepetitionNumber) ) Make sure the relationship is sorting the Grades records by course.
mleiser Posted July 7, 2011 Author Posted July 7, 2011 Let me try it this way. I have a field that is a text field - call it names. The field contains a list where I replaced the paragraph sign with a comma. So the field may look like this: "John,Bill,Mike,Susan,Elizabeth,Kathy". I want to easily take that field and put it into a repeating field called RepName, Each of the names above will be an instance in the repeating field. Can it be easily done? Mike
comment Posted July 7, 2011 Posted July 7, 2011 (edited) Yes, it can. But is even easier if you start out with a return-separated list - so the intermediate fields are just excess baggage. --- Note also that if you are using the List() function, empty values will be discarded. If a student has no grade in course #5, the list will contain 9 values with no "placeholder" - IOW, grades 6 to 10 will be shifted to the wrong columns. Edited July 7, 2011 by comment
mleiser Posted July 8, 2011 Author Posted July 8, 2011 Yes, it can. But is even easier if you start out with a return-separated list - so the intermediate fields are just excess baggage. --- Note also that if you are using the List() function, empty values will be discarded. If a student has no grade in course #5, the list will contain 9 values with no "placeholder" - IOW, grades 6 to 10 will be shifted to the wrong columns. If the answer is yes you can, how would I do it, even if I leave the list with the returns in it? I have the list field and the repeating field. How do I easily get one into the other. I figured out the blank grade problem. I put blanks in it if no grade and it works as a field.
comment Posted July 8, 2011 Posted July 8, 2011 (edited) Try: GetValue ( Extend ( YourListField ) ; Get (CalculationRepetitionNumber) ) --- I put blanks in it if no grade I don't think that's a good solution. How, for example, can you tell how many grades a student has? In fact, I don't think you should even have a grade record if there's no grade. Edited July 8, 2011 by comment
comment Posted July 8, 2011 Posted July 8, 2011 They want to see a table with classes as columns, students as rows and grades in the cells.
Recommended Posts
This topic is 4886 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