I must say I am really not getting math beyond the most simple possible. For example, with the expression limitations… how do you do a sum-product?
To get around bubble’s inability to have parentheses when it forces left-right evaluation, I tried to print out the products so I could sum them later. But I can’t grab the values out of the text fields.
The red indicates the products that I want to sum up (they are not products of the two numbers on the left). So the correct values are right there. So now I would like to have an expression and simply sum the values in each field. I could do that if Bubble would allow me access to those values, but it doesn’t.
Alternatively I can recreate the products and sum them up. But the left to right execution makes it impossible to get the right answer.
So I tried to download a plug in, I tried Math.js and toolbox. But I cant seem to enter in the parentheses I was promised would work in there.
Some info…
A Divisystem a bubble data type. the metals are fields in the type. Each of those fields are loaded in by an API.
and the issue with math.js is that I simply don’t see how to put the parentheses in. I can type the first one, but the closing parens doesnt work. I’m probably being stupid.
That looks useful, and solves part of the clunkiness of bubble (not constants or variables except states). However, my app its a free info tool. Paying for a plug in for a free tool is not economically sound for me.
The “Total Divi in Tier” column might be the thing’s TotalDivi field.
That repeating group’s “List of things’s TotalDivi” is a list of numbers.
The sum of that list would be:
ThatRepearingGroup’s List of things’s TotalDivi:sum
^^^ this goes in an expression field. The value returned will be a single value of data type number.
Of course such a list could also be sourced from a search (the same search that feeds to RG in the first place).
You might also construct a list of values based on user input or whatnot.
Any list of numbers (an array of numbers) will have the various numeric list operators available like :sum, :average, :max, :min, etc. (Consult the Reference for all the details.)
Similarly: Any list of texts will have a different set of list operators, appropriate for texts. Etc.
Well, your data structure is the thing that’s “wrong” (vis-a-vis Bubble’s built-in operators), right? Knowing this info now, you’re better armed to design your data types in a way to easily enable these computations.
Yup. so I should have created a list of masternodes and I guess created a repeating group of information about it. This style or method or storing data simply doesnt work with my brain. Its gonna take a while. The issue is that I don’t trust I can access the items as I need Them. This was evidenced as I tried to search for the latest created in a list of Divisystems and spend days trying to figure out how to get the latest one.