Newbies rihardf Posted June 9, 2003 Newbies Posted June 9, 2003 Database "voters" is related to "voterhistory" by the field voter_id. In voterhistory there's one record for each year a voter participated in an election. Each record consists off voter_id and year, both text fields. For printing purposes, I want to summarize all the related records for a particular voter on one line, instead of in a portal. The output would look like "2002 Primary, 2001 General, 1997" for example, where there are 3 related records for the voter in this example: record 1 -- year="2002 Primary" record 2 -- year="2001 General" record 3 -- year="1997" I'm at a loss as to how to accomplish this -- all help much appreciated.
Lee Smith Posted June 9, 2003 Posted June 9, 2003 What about making separate fields for each voting. Then it would be a snap. Lee
BobWeaver Posted June 10, 2003 Posted June 10, 2003 You could create a value list "Elections" based on your relationship from voters to voterhistory, and then create a calculated field using the ValueListItems function like this: Substitute( ValueListItems(Status(CurrentFileName,"Elections"),"
Lee Smith Posted June 10, 2003 Posted June 10, 2003 Hi Bob, With one small correction to your calculation, and it worked well, except that the index sort order is backwards which made it read: 1997, 2001 General, 2002 Primary instead of 2002 Primary, 2001 General, 1997 The calculation was only missing the ")" behind "CurrentFileName" so the ammended calculation should read: Substitute( ValueListItems(Status(CurrentFileName), "Elections"),"
BobWeaver Posted June 11, 2003 Posted June 11, 2003 Lee: You are now my official copy editor. Alas, the pay isn't very good.
Lee Smith Posted June 11, 2003 Posted June 11, 2003 Hi Bob, No pay necessary, just keep those greate tip files coming.
Recommended Posts
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