How to retrieve text from Muliple Select Component and not only "count"

Hi, how do you store the different items selected in a multiple select?

  1. Before an “order” is created the user chooses which toppings to add to her ice cream.
  2. To choose different toppings, I’m using multiple select.
    PROBLEM: Where and how can I store the different items chosen by the user? Each time a button in the multiple select is pressed, I need to combine it with all the previous selected toppings.

Here’s a video showing how it’s set up: https://vimeo.com/486029282/720b69d120

Any help would be greatly appreciated.

Note: When an order is created, an SMS is sent to the restaurant with the order details, so I can’t create an order before it’s submitted by the user.

I think you would do this order:

Create order
(Mark it as Draft or something in a column called Status if you want)
User adds/removes toppings, so now you can do an update to the order
User clicks Order
Change your Status to Ordered
Send SMS

Something like that should work.

You can also add a Cancel Order button that would delete the order…

1 Like

Thanks @TonyD, I did what you recommended for updating the order with the topping variants and it’s able to store the variants in the order… but it’s not usable yet: it’s not able to retrieve the NAMES of the variants. It can only count the number of variants.

When creating the SMS it can retrieve that there are 2 toppings but it cannot retrieve the name of these two toppings. (I did a MANY to MANY relationship between order and toppings).

Any idea how to solve from here?


Screenshot 2020-12-02 at 09.57.13

@Victor would you know how I can get the text string of the “topping variants” and not only the item count of it?

Here’s a video showing you the problem in the app https://vimeo.com/486415199/7d38322337

I think the only way to do this would be to create a text field that is updated with the selected item’s names each time you select it in the Multi-select.

3 Likes

Hi @axme,

I upvote @pfordmedia - as for me his suggestion seems to be the best one.

The problem you face is that you need to extract the topping names recursively (you really don’t know how much toppings do you have - 1, 2 or 10). So for such types of relations Adalo allows only to get count (which is pretty logical - Adalo can’t predict how many connections will be created in a lifetime of the app, so which values should it present?).

So in your particular case you need to store information about toppings into the order itself, and using @pfordmedia suggestion could be the best solution.

Best regards, Victor.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.