This reusable element is used on my Index page. I want to build a workflow so that when the ‘edit’ button is clicked to show a popup. That popup is also on the Index page right now.
When I try to build the workflow from the ‘Edit’ on the reusable element page it only shows me the other elements that are part of the RG Dropdown page.
How do I get it to show things from the main Index? Is it possible?
I’m having some trouble understanding your idea, I’m sorry! I want the ‘Text Edit’ option to open a popup on index page. Just not sure how to reference it. When I try, I can only see elements from the reusable element, not from the index page…
Hi @adamgraff89
Even i’ve the same question but i didn’t find any solution ?
For time being i just copy & pasted the popup from index page to my reusable element (For me its just a form) so it works for me…
Reusables can’t see the page it lives within, it’s a complete self-contained unit so from within the reusable you won’t be able to access elements outside of itself, except for elements that are on it.
If you want to show a pop-up, you could just have another reusable that contains the pop-up, place it into this reusable and call it from there. However, in my experience, having reusables within reusables can cause a lot of confusion unless it’s designed properly.
Alternatively have a custom state on the reusable (your menu) and when they select an option, a workflow sets the custom state to reflect that selection. Inside your main page, have “Do when condition is true” event that is based on the reusable element’s custom state. Make sure you set it to Run This : Every Time. On this workflow add an action to call your pop-up.
Perfect sorry did not read you wanted the popup to show, thought you wanted to show the group focus.
@adamhholmes is right you can have the popup inside the RE.
But if you have to have it on a different page outside of the RE, set a state on the reusable on click of your text edit and then have on the page a workflow “When state of RE is e.g. 1” then show popup and reset state to empty.
Super clear thanks for that. Only problem I’m running into is that I can’t seem to reference my RG dropdownMenu in the workflow, any ideas why that might be? Nothing comes up when searched…
So you’ve got your reusable inside a repeating group? OK, the reason you’re not seeing it, is because the “Do When Condition Is True” is run at the page level which doesn’t have the context to see elements inside a repeating group cell, as they’re effectively an array/list of elements, one for each cell/record, rather than one single element you can access, if that makes sense.
Honestly, I would use Vini Brito’s (@vini_brito ) Satelite plug-in for stuff like this as it just makes it so much simpler, but failing that you need to somehow get a result back up to the context of the page level to listen to in a “Do when …” event based on a custom state. To do this you’ll need to set that state from an event which has the same context as the current cell that the menu is being selected from. I’ll have a little play and get back to you with something, I definitely had the exact same thing working before I got lazy using Vini’s plug-in so I’ll look it up.
Yeah there isn’t a way to get the value out of the repeating group for the cell selected and call the action you want to be utilised with a “Do When A Condition is True …” at the page level for you to be able to call a pop-up from within the page. The way I did it originally, before switching to using Vini’s Satellite plug-in, was to just embed the popups in the reusable and call them directly from the menu in the reusable.
Whichever way you slice it, there isn’t a way to pick-up an event to recognise a change or an event on an element within a repeating group from outside itself. I would definitely recommend the Satellite plug-in, it’s made my life a lot easier. Essentially you set-up a satellite element to emit values or data on a reusable and then put antenna elements wherever you need to listen and respond to those events no matter where in your app it occurs. I put a satellite element on every reusable I use as standard so that it’s ready to emit data to another place in my app that needs to know about it. In your case you could just put a satellite on your reusable and an antenna on your main page that’s listening to the event that the satellite emits. Then call the popup on your main page in response to an antenna event received. It’s the same as “Do When Condition is True” but can be used everywhere in your app.
Anyway if you don’t want to use the plug-in you can either embed your pop-up in the menu reusable itself or have another reusable for the pop-up that you include in your menu reusable.