I am building a dashboard about energy consumption and I want to create a tab with information about annual consumption with variation from one year to another. I created this math expression with gives me porcentage how much the consumption has varied from 2021 to 2022. I would like to be able to automatically save the result of the expression in the database without having to create an input or a save button
. Is that even possible?
Hi there, @riverogonzalez.isaac… when do you want to save the result of that expression to the database? I mean, I understand you don’t want an explicit save button, but something has to trigger the save. Do you want to do it on page load? Do you want to do it on some sort of schedule? What are you going for there?
Hi @mikeloc ! Thank you very much for answering.
So basically what I thought is that that client will have a popup where he will introduce de information abour energy consumption from las year and this year. Bubble will then automatically calculate the variation (please see the “variation annuelle” tab in the picture
) I need that result to be inserted automatically in the database for two reasons:
- To create a conditional “when Xdata <0 turn background green” for example
- To have as much information as possible in the database.
I hope my explanation is clear enough
If the user is entering information in a popup, it seems like you should be able to calculate the variation in an input element in the popup, and save the input’s value to the database when the user exits the popup.