(1) Parent Resuable element
(2) Child Reuseable element
To do this (what I’d do), is add a state inside (2) Child Element, and whenever that state changes in (2) Child Element, I would do something based off that inside the (1) Parent element (Do when condition is true, like “state is not empty”, or “state is yes”).
You’d either create a custom trigger inside that child that you can activate from your parent, or set the child’s state to something and have your child do something when that state is set.
Reusable éléments now support adding custom parameters, which are more flexible than states. Basically, you can add multiple data sources. Alternatively, you can use URL parameters - they are accessible from anywhere!
If you can access the parent’s state from the child, why not make all custom states in the parent (none in the child)–or even in on the page itself or in a container that’s a parent of the parent RE?
Your problem is not with Reusable elements, it is with elements that are within a repeating group. It is known that elements within a repeating group are not accessible from outside of the repeating group, unless you use an approach to make them so. One approach is to use a free plugin called Orchestra, there is another approach to use the toolbox plugin and some javascript. You will find many discussions on the forum of this issue.
I’d imagine you were searching about reusable elements passing values to each other and not about accessing values from elements within a repeating group from outside of the repeating group.
You might want to look into URL parameters for this. You can set a URL parameter and give it a type of a “thing” you’ve created. Then, you can set the value as the unique ID of the thing.
Then when you “get” the data (when you access the data from the URL parameter) you can set the type as well. This way you can pass data between repeating groups or reusable éléments without plugins (I don’t recommend plugins for things like this, but yes they do work too)
I use an external database, and when I’m in Child (the second RE), I update a specific record. Once this record is updated, I need to force my table to refresh without relying on the current time changing since the last registration or update. (it doesn’t do this automatically, and I don’t want a page refresh)
I haven’t introduced URL parameters yet. However, would I be able to retrieve a Custom State through URL parameters?
I have not used the table element, but my assumption is that it works much like a repeating group, and so is likely that you might not be able to access the elements inside of the table element from outside of the table element, which the parent reusable is outside of the table while the child reusable is inside of the table.
I started looking into this plugin. I must admit, I’m a bit slow, and I don’t know where to begin with using the Orchestra plugin. When I look at the original post, it seems to go way over my head. I don’t get it.
I feel like I’m fumbling in the dark. But I tried this without any luck
I added a Musician to the Child element (the reusable element with the edit form).
I also added a Maestro to the Parent element (the reusable element that contains a table).
But where do I go from here? I tried to initialize Musician when the update button is clicked and when Musician is revealed - set state on the child, and WHEN Maestro is finished - set state on the parent, but without any luck. You’re a pro @boston85719. I guess this is child´s play for you!
For the month of August I have a promotion where I’m offering free 30 minute bubble coaching. If you’d like, I can hop on a call with you and show you how to do this via the plugin or URL parameters (there are two solutions to this problem, and admittedly it’s a little complicated / advanced).
I’m not sure…when I suggested it, I was under the impression you were using a repeating group and not a table element. I suggest reaching out to @jonah.deleseleuc and take him up on the offer. He is very knowledgeable and should be able to get you sorted.