Invisible action-trigger (monster) inside reusables! No-plugin bubble trick!

Update: Content has changed since first share because I figure it isn't going to work in the way I suggested before. But it is still good for the reason edited below!

I’ve been struggling - big time - from day one when it came to firing actions between reusables in my fairly large one-page app.

Introducing the tiny monster that I call IaT (Invisible acion-Trigger) (which is it’s new name after the previous post change but still…) that can be used to simplify workflows across reusables and saving you from bloating your workflows with “Do every time when” actions where you not neceserraly need them.

You can have your own by creating a tiny, floating reusable element, fill it’s custom states up with all the usual actions you’d like to trigger across the page, push some changes into it’s custom states and automate workflows within (for clarifications, that’s inside your reusable) based on changes you need to happen in your database, link or frontend.

Hope it helps for some who are also struggling with the stuff that I just went though in the past months.

Keep on building!

I have bad news for you

Oh, gosh, what is it?

I’ve used this method since pre-responsive days. Still my-go-to. Although, it would be nice to permanently have a “hidden” element spot in which we could add our own elements to without needing to use this hack. It’s whatever, though.

1 Like

That info was available to you all this time, here is one from me if you want to store a list dynamically or binary yes/no list (Trust me you will need this for filtering function at some point), create a global reusable, property2 call them list1_yes/no list, property 3 list2_binary, property 4 list3_list_of_text and so on. This will save you creating empty repeating groups just to pass data or first hold dynamic list

2 Likes

That’s fair enough. I can beleive it was available all the time but I, despite many search atempts in multiple occasions, wasn’t able to find out about it before this point.

So a post like this could help others who might struggle with it.

Not a biggie though, we learn as we walk. Thanks for the tips, will use them at some point for sure.

1 Like

Can you clarify more on how it works? How is the IdC getting custom states filled in? And isn’t every instance of IdC going to be different for every page/reusable it is put in and hence custom state of one won’t be same as custom state of other?

I do use reusable like this across my pages/reusables, but I use it more like a library of common custom events that I want to use in my front-end.

1 Like

I flagged this before, it is very hard to find things in the forum, need AI assisted search. You can do chatgpt deep search to get links

1 Like

Could you not use properties for this instead of custom states?

You could but then you are bound to one type of data which the group allows to be held at once, wheres custom states have an unlimited amount of records and types.

Not groups, reusable element properties.

The reusable itself works like a group, a floating group in this case. I’m not able to follow, what do you mean?
Don’t you have to define the type of data it can hold before you’re able to put any data inside it’s properties? :face_with_raised_eyebrow:

You’re right, my bad, and I only realised this after sharing this post. I should correct it.

It is great in one way (which was the case why I needed in the first place) - use triggers across the page sent from the reusable - but not the other way - exchange data.

It’s a bummer, and makes things complicated once again…

I should stick with “send / receive data from URL” instead. That seems to be the only relyable, easily scalable way so far.

That is not any longer the easiest or most scalable way. In fact the use of URL parameters and URL path lists are most definitely not scalable as there is a limit enforced by Browsers as to the length of a URL, which max out at around 2,000 characters.

The easiest and most scalable way now is Data Jedi Plugin. It also makes it possible to have a back and forth communication from the single reusable element that is a Data Center and the pages and other reusable elements throughout the entire app. In the video in that post on the thread linked above, I outline how to leverage Data Jedi to create a Data Center which can perform all CRUD operations of an app and make it so that the Create, Update and Delete all happen on that single Data Center Reusable element and the Read portion happens there as well. All communication between the single reusable element that is your Data Center is global across the entire app anywhere you place the Data Center Reusable element.

Sorry but this plugin is way too rich to my blood. Until I can solve it with other things, I’m happy with what I’ve just got.

Thanks though.

1 Like

Are you sure about that?

JS2Bubble is free and would like a word with you. And URL parameters are fine for most other use cases.

1 Like

about how easy I’ve made it and accessible for non technical users?

sure, yes, other use cases, that when needed to be scaled will hit a limit…so not being limited by a character count, would imply the most scalable method

That is no worries. If you need to create larger option sets, the time saved would be worth the one time payment and then you’d be left with all the other enormous benefits it provides for.

So we had a conversation about this yesterday with around 20 senior devs in Atlanta, about best practices for passing data between reusables. I’ll just relay what we found:

For multiple levels of reusables, states and Do when gets a bit hacky, though is fine for simple use cases and most of the time you are able to structure the app correctly so that passing data between multiple reusables is rarely necessary.

JS2Bubble is very straight forward and takes like 15 minutes to learn, even for non-technical users.

URL parameters are good though for large apps may sometimes conflict with each other.

We concluded that JS2Bubble is probably a generally better practice but you must manage it well / track usage / document so that you don’t accidentally create things that conflict with each other. In terms of JS2Bubble versus alternative plugins, it makes sense to use a well-proven and maintained free plugin that is almost part of the core Bubble toolset, versus a niche (and $150) one to accomplish the same thing.

Just be careful if you’re going to say your product is the ‘easiest and most scalable way’, it better be backed up by other devs and a good justification

2 Likes

I use the “Satellites” plugin for this purpose, I find it easier to organize and orchestrate than many J2B events. Its free, tried and tested and owned by Zerocode so best chance of it being looked after over the long haul.

Ultimately I think its just J2B packed up neatly, so there’s probably not much in it between them, so boils down to preference.

1 Like

This has just been released and has not been tested by many. I can tell you from my years of experience and being non-technical that JS2Bubble definitely is a plugin that enables the functionality to send data from reusables to other areas of the app, and does enable you to trigger events when the processing is complete. Now, as a non-technical person, it had been out of reach for me personally for the past 6.5 years of building on Bubble because I don’t know how to write javascript.

I eventually got to learning it and could with some simple scripts do some processing and passing data from one reusable element to other parts of the app. So, I would say that it is still out of reach for me to utilize it in the same manner I’ve been able to build my plugin to do. Some of those things I focused on were to make it accessible for non-technical users and not necessarily for the Pro Bubble Developers who have a background in tech and likely have been using JS2Bubble for years now. So, for those Pro Developers who feel that Toolbox plugin is their go to choice for this need, that is great, and for those non-technical users who find it challenging to create the same functionality with Toolbox, can now use Data Jedi.

Okay, easiest would mean, no need for code, so check. And most scalable as in what, no limit on character count then check. But if you are referring to use it for more and more data types as your app data structure grows, then check on that as well. As with the built in actions connecting to your apps API and the exposed values from the Data Jedi Plugin Element, you do not need much setup.

And in terms of documenting it and managing it as it scales, simple.

Just add a new option to your option set. Then for your CRUD reusable just reference the option set values to ensure you are targeting the appropriate data and elements for their purposes.

To call it niche as in it only does one thing is a bit absurd. If you have not checked out some of what it does, go ahead and do so, as it doesn’t just allow you to globally communicate data for all CRUD operations, but also saves WUs, improves performance (ie: data is downloaded faster) and opens up functionalities that previously didn’t exist in Bubble (like the new searchbox element that works with all 4 major data types available in Bubble - those are custom data types, option sets, api connector objects and plugin data types) or the elements that make SEO a breeze, especially the URL Path List Extractor element. On top of that it allows you to quickly create options sets, opens the door for option sets to be user created and more. I already have a filter element that does deep nested filtering on the data client side at no WU costs. There is a database diagram schema already in it, and I’ll be adding in the export and import features within the next month.

Trust me, I understand and anticipate a bit of confusion around it, as it is all new in terms of the Hybrid Data Structuring approach it enables to be in reach of any Bubble user, pro or beginner and the immense WU savings that it allows for. I figured those who are unconcerned with WUs would be unimpressed with the plugin on introduction, as they would likely fail to look at the larger aspects of what the plugin does and all the additional functionalities it has built in and what it can enable, such as improved performance, extra security layers (keep option sets for user roles hidden, only have fields for that privacy rule rule so in the event privacy rules fail for some reason, the object only has the fields the user would be allowed to see anyway or using the User data type to store lists of things rather than a custom data type that stores the entire apps users bases objects which is helpful for systems like contact management.

1 Like