Reusable Element Back Button

Hello, I have a back button in my one-page mobile app, using @gaurav’s EasyList feature.

Currently I have many back button elements that each execute the workflow “revert to previous list element” to go back to the previous page. I tried to change it into a reusable element, however I am not able to affect other elements or use workflows that I need. Is there a way to do this (ie. set state of another element outside of the reusable element), because without workflows, I have to create many element copies, which becomes inefficient. I’ve read the documentation and searched the forum, but have not found an answer yet.

Also, in this case would it make any difference to use a custom event and route it through that custom event if it’s just one workflow step? Is there any performance difference

Please let me know if there is a solution to this. Thank you.

You cannot set a state of an element outside of the RE. The way I get around this is to address things the other way round. While you can’t set a state outside of the RE, you can access the RE’s states from the page the RE is on.

So… I set up conditions on the page’s other elements based on the state within the RE and then just set the state of the RE accordingly via workflows within the RE.

1 Like

Right, however I am using a container element which does not have a workflow. And there is not a way for me to check when a reusable element is clicked.

It just seems that it would be much easier if there was a way to go outside of the scope or pass data from a reusable element to affect a custom state of another element

I think this plugin can help

1 Like

Thank you, looks like just what I need. I just hope that it won’t cause any side-effect performance issues

Hi @aph,
Actually you can avoid any state etc. and make synced communication b/w reusables and pages using the Env variables (bdk) plugin. Recommend taking a look!


1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.