Forum Academy Marketplace Showcase Pricing Features

How retrieve information from cells when the repeating group type if number

Continuing the discussion from How to add an 'Add New' button which adds a new row of inputs:

I am able to add a new row of inputs to the repeating group.
My challenge however is retrieving the information form the inputs when the type is different from the repeating group type (which is type number).
How do I go about doing this?

Depends on the database structure you are using. Simple way is to do a search, but that is not performant as each cell will be performing a search simultaneously. Better approach would be to use a plugin like list shifter that lets you track search result items by index…can then reference the list shifter list of items in the RG cell by the index number of the cell.

Let me be more detailed in what I am trying to accomplish
Building a hotel booking app. Screenshot of current set up:

I am using a RG. I want one room to show by default.
I have accomplished generating the extra room (when add room button is clicked) using the ListofNumbers.
The problem I am having is when the using clicks DONE to get the input from the fields because the repeating group is of type number.

How can i achieve this?
Is there another way I can set this up?

I don’t think that is the issue. I think it is maybe when you are trying to get the input values out. You should create lists to store the values, and run the workflow event when an inputs value is changed to use the inputs value to add to your list of values.

I don’t see why it is possible or not possible based on the type of data in the RG, but rather difficult to reference an inputs value that is inside of the RG using the click of an element that is outside of the RG.

If you had a button in the cell where the user makes those input values that would be clicked to capture the input values, it would be possible because that button would be in the RG cell. Since you wouldn’t want that then the only way to capture those values on an individual basis is when the input elements value is changed.

As it would be likely the user will make changes to those values or delete a room you will need way to store those values on the page and not use the database until the user actually clicks DONE to confirm.

I think you might find the List Shifter plugin a handy way to store those lists and to operate on those lists in different ways.

Hey.

I am stuck in the implementation of this because of the nested repeating group. Having a challenge figuring out how to iterate over each cell and extract the data. If I nest the Listshifter I can access it outside and the outside ListShifter cannot access the nested repeating group.
Trying to achieve:
For each room:
-get the adult names
-get the children name and age( from the dropdown)

I don’t want the names of all the rooms to compile into one big list
I want a list of rooms and each room is a list that has the names of the adults and children.

@AndrewV
@keith

Why are you using a nested repeating group?

From my understanding you are showing a page for a specific property, which may have multiple rooms…so you need a single repeating group that shows the rooms for that property. In that single repeating group you place the input elements for the user to add the values you want to capture.

Outermost repeating group = one room
Inner repeating group = name input field (number of input fields generated is dependent on the number selected from the dropdown - so if one adult is selected, one field would be generated to enter the name of that one adult)

Add Room button adds another room to the outermost repeating group

After the customer has add the number of rooms that they want, the adults and children in each room, the names of the adults and children and the age of the children; I want to capture all that information to store in the database.

Okay, so you have it setup in a way that for each adult there is another cell in that repeating group. So this inner repeating group is used just to get the names of the guests for that room.

Using the list shifter plugin you could do this.

Also check out the Orchestra plugin which is an ‘add-on’ for repeating groups to be able to trigger a workflow from outside of the repeating group that affects the elements inside of the repeating group.

I can’t seem to figure out how to get the ListShifter store the user input.

Can you share with your editor ? Need to see your DB structure

Hey Eugene sure.

You need to change permission in ur app
Here is :

Okay no problem.
I’ve figure out how to get the data from the RG using the ListShifter and Orchestra plugin.

Yeah , I also wanted to suggest Orchestra plugin, glad for you!

1 Like

So the two plugins I’ve suggested have been utilized to implement the solution or are you still trying to figure it out?

Yes I used the two plugins to solve the issue. Thank you.

Awesome, I’m glad you were able to get something put together. It is very satisfying when getting past what seems like a brick wall.

1 Like