Templates Plugins Courses

Lendy Template: Identifying All Elements Dependent Upon a State Variable

My question is specific to the Lendy Template (since that’s what I’m working on), but I assume this question has general relevance.

On the ‘dashboard’ page, there are many subpages which show up depending upon which menu item is selected. The way this appears to work is, when the menu item is selected, a custom state of that element (called ‘current’) takes a value (e.g. ‘dashboard’), and the value of this custom state determine which sub pages are made visible.

My question is how can I quickly see a list of all the possible values that this custom state can take, and how can I then quickly see a list of which subpages are supposed to show up based upon what the value of the custom state is?

It seems like right now the only way is for me to click on each item and inspect each manually; i.e. there’s no way to "work backwards’

Hi Brendon,

You typically won’t be able to see all possible values a custom state can take as a native Bubble feature. And we don’t always add this to the notes because they’re usually not a lot of them and are easy to inspect one by one. However you can quickly see all the workflow actions that make changes to the state by click the element with the state, clicking the “i” inspector icon and looking under actions. You will see actions that set the custom state there and can click to check the workflow view one by one.

Hi @mckorode,

Thanks for this. Just to make sure I’m clear, let’s use a concrete example. As you’ll see in the below image, I am looking at the “Group Loans” element. When I click on the ‘element inspector’ (thanks for that - I didn’t know that was there!), I don’t see any actions, but I do see two custom states.

So in this case, I should assume that NO action makes that element do anything or sets that element’s custom states? I assume that something has to set those custom states, right? Or were they just statically set?

Now if I compare that to the “Group Add Funds” element, I do see a number of actions here - I ssume that’s what you’re talking about right? So each of those actions in some way affects something about this group, correct? Just so I’m totally clear, what is the list of possible things it could affect on that element? Custom state, anything on the appearance, conditional, or transitions tab…is that right? Anything else?

Finally, a last simple question: why are different events shown in different colors?

Yes your assumption is right. Those states are not being used. They were not left on purpose however. Sometimes when copying elements some states are missed when clearing unused ones.

Each of those actions are related to the group’s state or data source. The actions could be using the values or setting them (states or data source). Actions don’t affect conditions or styling properties directly. But they can change state which are used in those conditions or properties.

It is done for organization. Workflows with same color do similar things or have similar CRUD function. For example workflows that do navigation/switching of views are colored purple. Green can be for payment related or workflows that modify exisiting data. Blue can be for workflows that create new data or do something new like accept stripe terms for example.

1 Like