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.