Change margin values dynamically in Conditional based on a formula

image

Is there any workaround to make update this value dynamically using a formula?

No, unfortunately.

I usually set a series of conditional statements and that’s usually does the trick.

Strange that almost all fields are dynamic but something so trivial isnt…

Probably something to do with the fact that the margins operate as CSS behind the scenes. So real-time updates on it would be a bit messy.

You can however do the needful by running a JS action (using the toolbox plugin) - but setting triggers to run this will not be as stable as I’d hope.
You can even give it a shot with the classify plugin - Classify Plugin | Bubble

I’d recommend going with a bunch of conditionals though. That’s most reliable.

All the best :slight_smile:

Ranjit / Atomic Fusion : Build better Bubble Apps FAST

1 Like

Hello @lunaticus96 ,

You can solve this problem by using a custom state.
Try to the add value of the field to the custom state.
To set custom you need to create a workflow on the field. (right click on the field and click on start a workflow.)
Then set the condition on the element you want.
(Like if the value of the custom state is “123” then the margin will be 10).

I hope this will help you with your problem.

If any further assistance is required get in touch with me on:
LinkedIn:- https://www.linkedin.com/in/karamjitsinghwaldi
Gmail:- karamwise@gmail.com

1 Like

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