Jump to content
Server Maintenance This Week. ×

player numbers


This topic is 8508 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

  • Newbies

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

------------------

Link to comment
Share on other sites

This topic is 8508 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.