“When an aircraft is created, how can I set a list of amenities with checkmark = yes from within the repeating group?”
You will need to create some sort of temporary list as you go along, suggest a Custom State. So when they are switched on/off you add/remove from the custom state’s list. An alternative is that you create the Aircraft thing (in blank form) when you enter the page, then do the switches directly. This will leave some orphan records if the user quits but that is easily dealt with by having a status.
“And how can I edit those amenities after the fact so there is the ability to turn on or off any amenity?”
You would use add or remove on the list, using a standard “Make Changes to a Thing”.
“What does “set list” “add list”, “remove list” vs. “clear list” etc. do? There are no docs for these commands.”
Set List = Make the list the same as THIS list here (so a custom state which is a list, or a search).
Add List = Add THIS thing to the list
Remove List = Remove THIS thing from the list
Clear List = Remove everything from the list
Where do I setup the custom state though? And how exactly would the state change occur?
I currently have a list of all aircraft amentities in a repeating group that is displayed when creating a new aircraft:
Do I put the custom state in a group? Is it a number state change?
All aircraft should have all amentites affixed to them, because amentities could be turned on/off at a later date, and they should also be dynamic in the sense that if an Admin ads a new amentity, that amentity is selectable as an amentity later on.
WiFi wasn’t on airplanes until recently for example. Now it’s everywhere.
It doesn’t matter where you put the state. You can put it on the page, which is often what I do so I remember where it is.
So all you are doing is keeping a temporary list of those amenities that have been switched on.
Switch amenity on (so switch has changed, and it is now “on”) - Add the item to the list.
Switch amenity off (so switch has changed, and it is now “off”) - Remove the item from the list…