Sending texts as a list of data type

Hello everyone,

I am stuck with this problem for quite a while now.

I am using a template ‘EZ Store’ from EZ code to build an online vegetable marketplace. I have made an addition of providing recipes to the users wherein users select a vegetable of their choice and I show them the recipes associated with it.
Going a step further I am providing the users an option to shop for items which they might be requiring to make that recipe (In a repeating group with type of content set to text).

Users can select these items from an ionic checkbox (in a repeating group with text as the data type)

Which further gets populated in another repeating group (again text type) displaying the name and price of selected items.

But this is where I am stuck…

image

When button ‘add to cart’ is pressed I want the selected items to be pushed into database’s ‘Ordered items’ data type but it only populates when one item is selected, whereas I want all the selected items to be sent to the data base.

I have tried it with ‘Item list add’ also but it doesn’t work. How do I go about it?

The best way to multiply your knowledge is to divide it in others… :slightly_smiling_face:

Can I get some help from the experts, @fayewatson @gf_wolfer @louisadekoya or maybe @romanmg

@Ankur

You could try doing it by creating a custom state on your page, which would be a “list of selected items”.
Everytime User selects an item on the RG, you should have a workflow to add this item to the state. In the same way, when User unselects an item, you should have a workflow to remove it from the state.

In your Create a new Ordered Item action, just select Item list add list state’s items

Thanks @ambroisedlg for the cue. It didn’t work exactly the way suggested, as the data type I was trying to send to database was ‘List of Items’ but was trying to extract it from a ‘text’, but got it working through a :filter function.

Now it is working. Thanks again.

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