Forum Documentation Showcase Pricing Learn more

Have a checkbox affect its parent's parent's group

#1

My app includes an order form for a food delivery service. Once someone adds an item to their order, an DB item of type Orders is created (has the person’s name, the food item, etc). A Repeating Group (Customer’s Order) shows these items. Within each cell is a Repeating Group (add-ons) whose data source is a list of add-on items that can be added to the food item in the RG Customer’s Order’s cell; each cell in the add-on RG contains a checkbox for each add-on.
My issue is that I cannot figure out how to make the checkbox add an add-on item to the order in the Custs’ Order RG cell.
I would ideally want to add a workflow that would, once a checkbox is checked, adds the checkbox’s parent’s group’s item (an add-on) to the checkbox’s grandparent’s current cell (an Order, the cell is the one in which the add-on RG resides).
To explain this is a representation of the setup:

RG: Customer’s Order
|Food item, picture, etc for food item #1
|RG: Add-on
||Add-on #1 checkbox
||Add-on #2 checkbox
|Food item, picture, etc for fod item #2
|RG: Add-on
||Add-on #1 checkbox
||Add-on #2 checkbox

#2

Hey @m_a_r_s!

You just need a group in the cell of your customer order’s rg, that will hold the current cell’s customer order. Then you can reference it from the inner rg for add-on’s.

Here’s adding it to the customer order (you’d need to add another for removing the add-on if un-checked)

Will that work for you?

–Ken



Looking to accelerate your app development?

Development of Advanced Apps at https://uniqueideas.com or schedule a free intro session :gift:

Ken Truesdale
LinkedIn

#3

I don’t think that would work because the RG is showing the addons associated with the order and not all the add-ons that can be added to that food item.
This isn’t particularly relevant because I found a better way of doing add-ons by making them a separate object (called Ordered Add-ons, the fields of the object are its associated order and the add-on). Then, I have a dropdown show all the add-ons that can be added to the food item; when another button is pressed is it ‘added’ by the creation of an ordered add-on.