Roster building list per user where each selection can have multiple options

Hi all,

I’m very new to Glide and have been utilising the existing support threads for ideas to muddle my way this far.

For background, I’m developing an app that will allow users to create a roster for a popular tabletop game. In this game, the user will select a model which comes with its own set of rules and additionally, a set of weapons unique to the character. My struggle is where the character chosen can pick from multiple weapons to take with them.

So far, I’ve populated tables for:
Units
Weapons
A helper table to link units to weapons (where it will allow for permenant links between Unit A and then the 3 or 4 rows of Weapon options for him from the Weapons table.

From here, I’ve created another table that acts as the List/Army itself(List_Builder). The screen uses the Units table above and as an action, can insert your selection in to the List_Builder table which inserts the Unit ID along with a unique identifier so that the app can keep track of more than 1 instance of the same unit being used. Great so far.

Now, I’m easily able to return the available weapons for a unit even from within the list building screen itself and that’s very helpful. But the next step would be selecting from the list of available weapons on a PER UNIT basis.

It’s not as simple as adding a checkbox column to the weapon list and saying include yes or no because there could be multiple versions of that same unit with different (or the same) selections.

So I’d understand that each choice needs its own unique ID. I was hoping that there was a way for me to utilise the existing action of adding the unit id to the list builder table to ALSO add the weapon options to another new table where each would be tied to the unique ID of that instance of the unit. But it seems like I can’t populated multiple rows (Weapons A B and C for example). I’ve tried using an array column which I can get to combine the list of available options per unit but I have no idea how to then use that array column to allow the user to pick from the contents of that array which ones they use.

Apologies if this is a bit of a scatter brained explanation, hopefully some of you know what I’m talking about!

Edit
I feel like if there was a way I could add Unit ID and also Unique ID to the List_Builder table and then also based on the Unit choice, populate another table with a set of Weapon that correspond to that unit id (pulled from the weapons table), my problem would be solved. I just can’t figure out how to pull multple lines from another table based on one input.

So as I understand it, your structure looks somewhat like this:

Units table: Store units that can be picked.
Weapons table: Store weapons that can be picked, and which type of units/rules can pick it. Is this rule somewhat like a “type” (say fire, water, ice, grass and only units of the same “type” can pick it?)
Army table: Store which units users will add to their army
Weapons x Army: Store weapons for units added to the army.

Sample data would look like this:

Units Table:

Unit ID Unit Name Unit Rules
U001 Unit A Rule 1, Rule 2
U002 Unit B Rule 3

Weapons Table:

Weapon ID Weapon Name Weapon Rules
W001 Weapon X Rule 1
W002 Weapon Y Rule 2
W003 Weapon Z Rule 3

Army Table:

Army Unit ID User ID Unit ID
A001 US001 U001
A002 US001 U002

Weapons x Army Table:

Army Unit ID Weapon ID
A001 W001
A001 W002

Thanks for the reply!

You’re almost spot on but a few slight differences.

Unit Table - Correct
Weapons Table - The Weapons rules aren’t so much limitations of who can pick, just what each one can do in the game. So for example;

Weapon ID Weapon Name Range Shots
W001 Pistol 12" 2
W002 Rifle 12" 4
W003 Launcher 12" 1

I also have a Unit x Weapons link table which is:

Unit ID Weapon ID
U001 W001
U001 W002
U001 W003
U002 W001
U001 W004

So that link table is used to show which weapons COULD be picked for that unit.

Then I have an Army Table which is built by Adding a unit from the Unit List using a custom action that inserts a Unique ID and the Unit ID in to the Army table to allow for someone picking the same unit twice.

What I want, is that when a user presses the Add button, instead of it immediately adding the unit as is (with all of the weapon option visible), there’s a checkbox screen first that allows you to pick which of the weapon options you want (there should be one checkbox for each of the weapons available for that unit).

On paper that sounds easy because if a user could only pick one instance of the same unit, I could simply add a new field to the Weapons table saying Picked_Weapon, yes or no. But the Army table could hold:

Army ID Unit ID Unit_Name
UID234 U001 Captain
UID523 U001 Captain

The first column being the unique ID that gets randomly assigned when a Unit is added to the Army table.

I feel like I need the following behaviour:
When the Add button is pressed, on top of the current behaviour of the Unique ID and Unit ID being added to the army table, I’d also need another table to be dynamically populated with:

Table Name: Army_Weapon_Choice_Table

Army ID Unit ID Weapon ID Picked_Weapon
UID234 U001 W001 Yes
UID234 U001 W002 No
UID234 U001 W003 Yes
UID523 U001 W001 No
UID523 U001 W002 No
UID523 U001 W003 Yes

In this case, when the add button is pressed, multiple rows are added to the proposed new table for a single unit. The Army ID would be the same unique ID that is assigned to the unit when it’s picked, then the Unit ID of course is the ID of the unit that was picked and then the weapon ID should be pulled from the Unit x Weapons table (one row for each weapon option).

This way would allow each unique Army Id instance of a unit to have its own weapon selections and I could simply asign a checkbox to the final field of Picked_Weapon.

I suppose it all hinges on being able to pull all associated Weapons from the Weapons table (that are associated to the choice via the Unit x Weapons table) at the same time.

Edit

Just to try to simplify the case, imagine the user can pick products in to a user specific list from a table of available products. There’s also another table that holds the Additional Extras that are available for each Product.

When the user picks a Product from a list screen, there is a pop up that shows each optional extra available for that Product.

The user can pick multiple of the same Product and each selection of the same product can have different variations of the options available for that product.

So after much struggling and being on the verge of giving up…it looks like I can achieve this via a new FORM screen as opposed to copying data.

I just need to get the new display to filter the weapons based on the choices it just made.

I think you don’t need the Unit x Weapons link, you can just build it inside the Weapons table.

Weapon ID Weapon Name Range Shots Available Units
W001 Pistol 12" 2 U001,U002
W002 Rifle 12" 4 U002
W003 Launcher 12" 1 U001

That would make for a nice flow, but I’m not sure why you need the Picked_Weapon column? And can’t you just store a quantity column instead of multiple rows of the same weapon?