Data from RG to another group

Hello everyone,

I created a table with a RG listing many items and subtables for each item.

Once a RG cell item is clicked, the subtable appears and shows the sub-items.

Once on the subtable, one can add a subitem with a popup according to its own item but I am having difficulties with sending the item data to the subtable and the popup, hence when I create a new thing from the popup, it stores all the fields except the item of the subitem (course in this case).

I saw the vimeo video of @keith which uses RepeatingGroup DataType listof:Item #RepeatingGroupCustomstate as the data source but unfortunately I can’t make it work.

I appreciate if someone could help me a bit.

Thank you.

Anyone?

I have assumptions of how things are setup, which may be wrong, but…

  1. The repeating group (Main RG) is of type Course.
  2. The nested repeating group (sub-items) is of some other type that is in your database structure related to the Course datatype. DB structure should have a data type of Course and another data type of ‘Sub-Item’…then the Course data type should have a data field that is a list of ‘Sub-Items’ and your ‘Sub-Item’ data type will have a data field of type Course.
  3. The Nested repeating group is of type ‘Sub-Items’ and the datasource is 'Current Cell’s Course List of Sub-Items.
  4. The Popup should be of type Course with no datasource.
  5. Workflow when the current cell’s Sub Item is clicked will open the popup in step 1 and in step 2 display data in the popup and it should be ‘Current Cell’s Sub-Item’s Course’.
  6. When you save it make sure to update the popups Course List of Sub-Items and create the Sub-Item and set the Course data field to the popups Course.
  7. When popup is closed, reset the data of the popup
1 Like

Thank you.

I agree but regarding 3/ and 5/ popup opening is done through clicking on a button within a second group element where the second RG is.

I can’t find a current cell’s course list in this second group data source, even though I display the data of the current cell’s item to the second group element and to the popup.

1 Like

Have you got a link to this ?

It sounds like that the click set a custom state of the item# in the RG which is then used in the Popup.

That would be because your database structure is probably not set up as I explained I believe it should be. Maybe making the database structure the same as I outlined, you would get that relation and then have the ability to get the data through the dynamic expression.

Yes, this is the video :

1 Like

I would love it to be that simple but I am scratching my heard over this.

As you can see, course has a field list of lessons and lessons has a field of course.

Send screen shots of the repeating group set up you have on the page, showing the datasource and data type of the main repeating group as well as the nested repeating group you are trying to click from.

Please find them below.

They are not set up properly.

Repeating Group Course is fine.

The RG dummy dragged (I don’t know what this is) can be deleted I guess

Inside of RG Course add a repeating group and set the data type to lesson and set the datasource to current cells course lesson list.

Can I set the datasource to current cells course even if the nested RG is a reusable element?

When you create the reusable element it should be a group and set the content type to course…then the repeating group will have type lesson and set source to parent groups course’s list of lessons…when you put that into the repeating group that is of type course with datasource of search for course, you will set the data source of the reusable element to be current cells course.

The nested RG seems to be well configurated.

I thought I had to use URL parameters for showing the list of subitems when clicking on an item. That’s why I didn’t go that way so thank you for that!

On the other hand, I don’t know how to show the nested RG when one item of the RG is clicked.

I don’t see any videos or something about nested RG and information about it seems scarce.

OK, I hate to query anything @keith does but …

Not quite sure why storing the index is more useful than storing the selected “thing”. That way you can sort the list and the edit still works.

Anyway…

Popups both have a type of Course.

Set the popup’s course to the current cell’s course.

And with the next popup to the Parent Group’s course (that is the popup in this case)

Then use the Parent’s course in the second popup to set the Course on Lesson.

1 Like

Because duplicate entries.

Consider the array:

[1, 2, 4, 4, 4, 7, 8, 4, 4]

And now you tell me, the selected item is 4.

And I’m like, sure, but WHICH FOUR?

The list is a list of things.

In a list of Primitives, I am fully with you.

But that wasn’t what your video was about :grinning:

Instead of PopUps we can use Groups …