LiveOak Posted January 16, 2001 Posted January 16, 2001 The difficulty with a summary field is that depending upon the sort order, the summary field cannot may give a different number to a player as players are added. The solution is not hard to implement, but is a little complex. Create a "Player No." field in the Player file. A field "Team No." is also needed. Create a self relationship with Team No. matching Team No. The players already entered will have to be numbered manually. Create a new script to add a player which has the user enter the team number into a global number field (gTeam No.) BEFORE the new player record is created. Then the script looks like: Allow User Abort (off) Set Error Capture (on) If (IsEmpty(gTeam No.)) Show Message (You must enter a team number!) Exit Script End If New Record/Request/Page SetField(Team No., gTeam No.) SetField(Player No., Max(Self by Team No.::Player No.) + 1) This script uses a relationship by Team No. to find the highest Player No. for a given team and set the new player number to one more than the highest number. Sorry for the complexity, not every question has a simple answer! -bd
Vaughan Posted January 16, 2001 Author Posted January 16, 2001 Sorry, I thought they only need a numbered list of names. The summary field will of course change with found set etc.
Newbies Chris Cunningham Posted January 16, 2001 Newbies Posted January 16, 2001 A simple problem. I have a roster of soccer players and would like to have a number to the left of the name so that the first player was #1, the second player was #2, etc to the last player. The number of players will change with each team. This list of players is in a portal. TIA ------------------
WBlanchard Posted January 16, 2001 Posted January 16, 2001 Not to difficult. Create calculated display name field. I'm assuming here that you have a player number field? If so, the calc would look something like this: ="#" & Player number field & " " & Player name HTH
Newbies Chris Cunningham Posted January 16, 2001 Newbies Posted January 16, 2001 The player number field is what I am trying to create. It should be a field that progressivly counts up 1 per player. I have tried puting the Count Calulation there but it counts the total number of players on the team. ------------------
Recommended Posts
This topic is 8784 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