I found Bubble and I am very impressed. I am a math teacher and I have a hard time making calculations beyond fixed numbers.
For example I would like to make a simple pythagoras triangle calculator.
The student gives the two sides a and b via input fields.
The page should now calculate c via squareroot of a squared plus b squared and display it in a text.
I tried using the math.js too, but also did not succeed.
^ This. There’s nothing else to know, really… Except for complete documentation on the functions, features, and syntax of math.js, refer to its documentation:
Have you had any luck with the :sum function in bubble? The definition is not in the reference material.
I am trying to create a billing system. I have learnt how to count the number of dates within a range. Now i would like to sum up the total cost to the customer withing that range.
There is a print screen below of what I was attempting. I can get the median function to work but I do not know why :sum will not work.
It works on lists of numbers. Here’s the thing to check: Is the result of your search a list of numbers? Maybe it isn’t. (Can you really do :median on the same list?)
As I’ve suggested to you before, just plop down a repeating group as a way of visualizing the results of your search. Make that RG’s source the Search you’re trying to get a handle on.
In this case, make an RG with source Search for Calendar Eventss’s Full price ticket
The issue checker will tell you immediately what data type that resolves to. (It’ll throw the pop-up that says, "hey, you made your source ‘X’, do you want to set the data type for this RG to X’s data type?) Further, you can just plop down a text element inside the cell of that RG to show you what the individual values are.
(Like, if it is a list of numbers, you can plop down a text element and use it to display Current Cell’s value. This is how you can visualize your lists while you’re developing.
You’ll also see, instantaneously, if perhaps you forgot what the “Full price ticket” field really is. Maybe the cost of the ticket is a subfield or something.)
Then, you can play around with how you might get to the result you’re looking for. Put a text element somewhere outside of the repeating group. Make its contents a dynamic expression like Repeating Group’s list of whatevers:sum)
This is how you can go about troubleshooting complex searches – build it up interactively until you get comfortable. Basically, stop thrashing and imagining what’s going on and just visualize it.
I have been copying your example of visualizing my work. What I am getting stuck on is creating the logic that will enable the repeating group to show data that sits within a range.
I cannot seem to get the overlaps function or any function that will allow some constraints of this nature. I have a drop down that the user can select the date range - this can be used to refine the RG - but I will still need the logic that allows for that analysis.
Attempt two - why will it not let me select the result of my drop down menu that allows me to select the range I am interested in. It is called term selector and it is blocked in the print screen below.
I am also getting confused on knowing when the reference material refers to a list - or a list of individual things. Should the :sum function work on both? When I could not get the :sum function to work I assumed that it is didn’t so I ended up creating all these duplicate list fields.
That means “not equal to” it returns true (yes) if the things on left and right are not identical. It returns false (no) if the compared things are identical.