# Add List Of Amenities

**URL:** <https://forum.bubble.io/t/add-list-of-amenities/10005>\
**Category:** Need help\
**Created:** [January 29, 2017, 5:23pm UTC](https://forum.bubble.io/t/add-list-of-amenities/10005 "2017-01-29T17:23:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JustinC](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@JustinC](https://forum.bubble.io/u/JustinC)\
**Post date:** [January 29, 2017, 5:23pm UTC](https://forum.bubble.io/t/add-list-of-amenities/10005/1 "2017-01-29T17:23:44Z")

</div>

Can’t wrap my mind around this today although it should be simple by now…

Trying to add a list of aircraft amenities (lavatory, galley kitchen, A/C plugs, WiFi etc.) to an aircraft.

I have an Aircraft Amentity Thing with an amenity name + on/off as fields.

On aircraft creation, it should search for a list of all amenities in a repeating group and display their name and on/off status switch.

When an aircraft is created, how can I set a list of amenities with checkmark = yes from within the repeating group?

And how can I edit those amenities after the fact so there is the ability to turn on or off any amenity?

What does “set list” “add list”, “remove list” vs. “clear list” etc. do? There are no docs for these commands.

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [January 29, 2017, 7:23pm UTC](https://forum.bubble.io/t/add-list-of-amenities/10005/2 "2017-01-29T19:23:39Z")

</div>

“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

---

<div class="post-metadata">

**Author:** ![JustinC](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@JustinC](https://forum.bubble.io/u/JustinC)\
**Post date:** [January 29, 2017, 8:06pm UTC](https://forum.bubble.io/t/add-list-of-amenities/10005/3 "2017-01-29T20:06:01Z")

</div>

Mmmmm. More custom states. gotta love em.

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:

![](https://us1.discourse-cdn.com/bubble/original/2X/1/1def402ae0762dcdb37bfe0c2199cb319a473579.png)

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.

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [January 30, 2017, 5:34pm UTC](https://forum.bubble.io/t/add-list-of-amenities/10005/4 "2017-01-30T17:34:29Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![JustinC](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@JustinC](https://forum.bubble.io/u/JustinC)\
**Post date:** [January 30, 2017, 5:35pm UTC](https://forum.bubble.io/t/add-list-of-amenities/10005/5 "2017-01-30T17:35:46Z")

</div>

This clears up a lot.

And when I save, I assume I use the “set list” operation and set the list according to the custom state list.

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [January 30, 2017, 5:44pm UTC](https://forum.bubble.io/t/add-list-of-amenities/10005/6 "2017-01-30T17:44:48Z")

</div>

Spot on 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [April 9, 2017, 5:23pm UTC](https://forum.bubble.io/t/add-list-of-amenities/10005/7 "2017-04-09T17:23:49Z")

</div>

This topic was automatically closed after 70 days. New replies are no longer allowed.
