So.. I have a Repeating group in my page and each cell contains a Reusable Element. How can I do to get a piece of information when an action occurrs within the Reusable?
Unfortunately, orchestra plugin wont cut it since musicians and maestro are not in the same page and also URL params are not enough.
Add a JavaScriptToBubble element on your main page (set to publish a value, of the correct type).
Then inside your reusable element, when the action occurs, just call that JS2Bubble element using a Run Javascript action and pass the relevant data into it.
Iām a non-technical bubbler and tried this method with partial success. Any insights or tutorials you / anyone else could point me to would be much appreciated.
Iāve a reusable element in a repeating group with a yes/no state thats triggered when input within that elementās value changes. I need that yes/no in that reusable element to register on the main page so as to trigger other actions down the line. I setup a TEXT element along with the JS2Bubble element on the main page. Tho it clicks through without errors I canāt seem to get the yes/no to show up in the text element or anywhere else? Again, not being technical, I think Iām missing something fundamental in the setup. Best-
Then in your main page, create a new workflow where the event is javascriptToBubble event. Then you can use this javascript to bubbleās value listās item Xās yes/no.
Iād also recommend not making the suffix ātriggerā and instead something a bit more descriptive and specific, because these functions must be unique on the page. So if you added another one, you couldnāt call it trigger again, maybe trigger_two, but thatās not really best practice.
No joy⦠Just want to be clear. I only need ONE Java Script Element and it goes on the Main page and NOT inside the reusable element residing in the repeating group on the main page? However Iāll need TWO workflows, one within reusable element triggered by a change of an inputs value and the second on the Main page?
Could you share more information? Itās a bit confusing understanding what you are working with. Some screenshots of your current workflow in the reusable would be helpful.
If I understand correct, you have a main page with a repeating group, inside each repeating group cell there is a reusable element with a state for yes/no. You want so if any RGās cellās reusableās becomes yes/no then trigger something on the main page?
What is the input type on the reusable? That sets yes/no. And that yes/no is being saved to a state on the reusable?
You nailed it. Thats exactly what Iām trying to do. When the user changes a value(s) a workflow begins with JS2B āYESā does a couple of things then end with JS2B āNOā.
Maybe it doesnāt need to be a YES/NO? I suppose it could also be Arbitrary text YES or Arbitrary text NO?
Iāve tried many iterations and setup several different ways to capture the result. They click through without error but nothing resisters yes or noā¦
If you want to pass values to the JavaScript to bubble, they donāt go into properties.param1 or param2. They have to go into other fields⦠either in return, or in output1 or output2ā¦
The Toolbox documentation makes this clear:
I put together a quick example here so you can understand. Donāt worry about the data type or anything like thatājust focus on the logic Iāve implemented. I have a JavaScript to Bubble on the page, a repeating group, and a reusable in the cell. Inside the reusable, I have a dropdown that runs the javascript. I think this will help you understand better:
I really appreciate the effort. But I have to say nothing about that docs was clear. I just need a reusable element to transmit YES or NO to the page in-which the repeating group resides. Why is that so hard for bubble to do? Yes⦠or No. Bubble drives me madd with this stuff sometimes.
Iāll just have to think of some other workaround - again!
Yeah bubble can be annoying. I made a demo page for you. Itās simple and explains exactly how to achieve this. I promise once it clicks, youāll be shocked how powerful it is.
Sorry to say, I keep getting an error: āBug in custom code ReferenceError: bubble_fn_shuffletrigger_yes is not definedā.
Question about your example: Why is the cells index important?
To be clear any one of the elements in the repeating group can can trigger the āYES/NOā Itās doesnāt need to be specific to just one.
Two things that are different from the others examples Iāve tried.
You put the JS element in the repeating group NOT just somewhere on the page.
The reusable element is included in the suffix
Iāve tried about 37 variations, derivations and guesses that all end up with the same reference error. I simply canāt believe Iām having this much difficulty in getting this thing to register a simple yes or no.
Ah okay, if you donāt care to track per repeating group item, and want to track in general. That makes it a bit easier. Again, I updated the demo for this. Just look at it.
If you follow the structure of the demo editor, and reusable youāll be able to get it setup in 5 minutes.
Bug in custom code ReferenceError: bubble_fn_shuffletrigger_yes is not defined
This part means that your JS to Bubble event isnāt visible on the page, ensure that itās visible on page load and in the input field you are using just the suffix not the entire so.