lpa

Concert player list management

Recommended Posts

I have a site for an orchestra. I would like to keep track of the players participating each concert. 

The players are kept as users in processwire. Each player has a default instrument as a user-field, violin, bass, flute etc. But some players play multiple instruments. 

Each concert has a page in PW. The players for a concert would be selected from a list of users. The list would then be used for sending email to the players of that concert and keep track of the players salaries etc. 

This would be easy to accomplish with Page references and ASMselect to the users-pages. BUT because the user might have an other instrument from his/her default instrument in one particular concert, I have to keep track of both the user and the instrument in that concert he plays. 

How would you do this? Make a repeater for the players of the concert and change the instrument for the player in the repeater? PageTable? Some other fieldtype that I don't know or remember? How to make a nice interface for selecting the players and attaching them to correct instruments?

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Nice module, but I don't get how that would solve my problem. 

I need in each concert  a list of the players with their instruments in that concert like this:

Concert A:
Violin: Adam Smith, Joe Bush
Viola: Mark Taylor
Bass: Kate Jones

Concert B: 

Violin: Adam Smith, Mark Taylor
Viola: Joe Bush
Bass: Henry Wilson

Mark Taylor has Viola as his default instrument on his user-page. But in concert B he playse the Violin and should be listed under the violin players. His default instrumnet should not change from Viola to Violin. 

How would you store the list of players grouped by the instruments under the concert template?

Share this post


Link to post
Share on other sites

You will need to use a repeating field type "Players" for the players. For me, the order of preference in terms of UI would be:
1. ProFields Table
2. Repeater
3. PageTable

Within each item of Players you have two Page Reference fields - one for Player and one for Instrument.

The safest thing would be to specify the instrument for every player in the Players field. But if the default instrument of a player is something that is fixed once selected (i.e. a player never changes their default instrument) then you could consider including the default instrument within the "Custom page label format" of the Player field. Then the instrument field could be named "Instrument override" and you only set it if the player is performing with something other than their default instrument. This would make it a quicker process to add players to a concert.

  • Like 4

Share this post


Link to post
Share on other sites

Thanks, I will give this a try. Just asking what do you mean with "Custom page label format"? The players default instrument in the user template could be considered as fixed, I think. But there are always exceptions...

Share this post


Link to post
Share on other sites
16 minutes ago, lpa said:

Just asking what do you mean with "Custom page label format"?

This is a setting for Page Reference fields. It appears when you select "Custom format (multiple fields)" in the "Label field" dropdown. You would use something like {default_instrument.title} as part of the custom format, so you can see what the default instrument is for each player within the Page Reference inputfield and therefore if you need to override it.

2018-01-17_083029.png.f036cb879d75c3acc7a72749b6cfc788.png

But bear in mind that if you do not manually select an instrument for each player and a player later changes their default instrument then all the concerts they have performed in will show the new default instrument, which wouldn't be good.

  • Like 1

Share this post


Link to post
Share on other sites

Great, now I got it. Thanks!

Share this post


Link to post
Share on other sites

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


  • Recently Browsing   0 members

    No registered users viewing this page.