Chris_J Posted May 1, 2008 Share Posted May 1, 2008 I have a table, which contains letters and is linked to my Contacts by Contact ID. For instance, if I enter 1 in the letters field, that person's name appears in the name field. all working beautifully at the moment. What I would like to have is a number field corresponding to the number of letters sent to that person. i.e. if I send a letter to contact 1, then I want a number 1 to appear in my letter number field, and then if I send another, number 2. Then if I send a letter to contact 2, I would like the number 1 to appear and again 2, 3, 4 etc for letters for that person. Any ideas? smiley-tongue-out Link to comment Share on other sites More sharing options...
Maarten Witberg Posted May 1, 2008 Share Posted May 1, 2008 Use the count () function in this manner: count ( letters::letterID ) or count (letters::contactID ) Link to comment Share on other sites More sharing options...
Chris_J Posted May 1, 2008 Author Share Posted May 1, 2008 Just keeps coming back with 1. Link to comment Share on other sites More sharing options...
Maarten Witberg Posted May 1, 2008 Share Posted May 1, 2008 do you then mean counting the number of letters sent to a person using a field in the letters table? should the number be fixed so it's actually a sequence number? Link to comment Share on other sites More sharing options...
Chris_J Posted May 1, 2008 Author Share Posted May 1, 2008 Yep every letter will be on a different record though. Is that bad? However, I would like the first to be 1 the 2nd to be 2 and remain like that if possible. Then the next person's letters to be 1 then 2 then 3 etc. Start at 1 and count up for each person Link to comment Share on other sites More sharing options...
Maarten Witberg Posted May 2, 2008 Share Posted May 2, 2008 A while ago I made a demo called FancySerials that tackles this (among other things) Locate it here Link to comment Share on other sites More sharing options...
Recommended Posts