I am trying to add numbers that have been calculate in previous steps, but the return value is always zero for total income. Any ideas why? thanks
![]()
I am trying to add numbers that have been calculate in previous steps, but the return value is always zero for total income. Any ideas why? thanks
![]()
If it returns 0 there is a problem with your formula, check what each parameter is and if there is a field that is not set correctly.
This will solve it.
Hi @carpantry1986,
Welcome to the community! ![]()
Like Nadav mentioned, looks like you’re formula isn’t correct. Why you’re using the SUM of the properties instead using the current record data? In like where in your app this form has been located?
Let us know!
Thank you and have a great day!
It worked when I used the same custom formula in a text box. I don’t know why using the same formula in the forms’ auto field component section results in a return value of zero for my entire income.
Hi @carpantry1986,
Thanks for the update!
Wait… The form is to enter those data right? I meant, there’s a form which contains those 1-9 fields which user enters the numbers (data) and then when hitting save, the SUM of 1-9 fields entered numbers should be saved on the 10th field automatically right?
If that’s the case, you shouldn’t use that kind of calculation which you simply needs to add an update > new record action in the submit section which then you simply populates those 9 fields from magic text (not the SUMs) following with the + symbol in the 10th field (total income property).
Thank you and have a great day!
Hello,
That form is not used to enter those data, it is used to calculate them and store them in the collection. In other words, the user inputs formation in different areas of the app and then I have to manually combine relative data that relates to my sum category. For example, a user can enter information on income from interest on 1099 and K1, then I have to sum the interest from both. My goal is to calculate the new numbers and have them stored in a collection because I need those numbers for other calculations. I do not want to keep writing the same custom formula over and over.
Hello,
The sum function is the only option I get when I use the magic text function. When I hit the create form button, all the formulas calculate but then it stops at total income. Do I have save the calculated data on a separate collection, then pull from that collection? In other words, do i have to calculate the numbers first, save it, then use it in other calculations?
Thanks
Hello,
Which/where parameters should I look for? In the previous steps, formulas are addition and I get a return value for each category.
Thanks
Hi @carpantry1986,
Thanks for the updates!
So you have a collection with those 10 fields (1z. INCOME, 2b. Taxable Interest, …) and then in the app, in each section/action you keep that one row in that collection, updated. So now you have a form to update the ‘Total Income’ property for the row in that collection by summing 7 properties in the collection. Am I correct or missing something? This is what I think you’re trying to do. : https://drive.google.com/file/d/1Ub-N5QA9yhMkhMpUPWma-otjwyAXLd7d/view?usp=sharing
Hope I understood the issue properly!
Thank you and have a great day!
Hi Crhis @carpantry1986,
If you have a formula which works in the text label, but does not work in the form, then you may be hitting rare Adalo bug connected with sums and counts.
Just in case: did you try to use 2-step approach in the form - add a 2nd action to update the record and set the value with the formula there?
Best,
Victor.
Hello,
Not quite. I have attached a link to a video of what I see and i sent you an email. Thanks
Hello,
Yes, I did try that and it did not work. I did try it in several different areas and ways just to be sure if the 2nd action to update worked or not because that was a good suggestion. Please send me your email and I will grant access to the video I sent Dilon Pereral. Thanks
Hi @carpantry1986,
Thanks for sharing a video recording!
The issue is that, there’s no data (rows) to calculate the total income according to your video because the other properties need to get updated where they gets calculated at the same time.
What you need to do is, remove the total income property from the automatic fields section and open the submit button section. Then add a update > new 1040 line action which you SUM up those properties in the total income property. So once you click on the calculate button in the form, it calculates other properties in the automatic fields section > create the record in the collection with those data > then firing up this update action which the total income property should get updated!
Check this video recording. : https://drive.google.com/file/d/1ki6Frq-5tQ9oCkZ07rf7onI3-d__8Cpf/view?usp=sharing
Let me know how it goes!
Thank you and have a great day!
Hello,
No luck, but that was a good suggestion. It is strange, because when I think about the order of how all the steps are executed, it should work but it doesn’t.
Hi @carpantry1986,
It’s because you’re still going with Logged In User >… but you need to add a update > New 1040 LINE (not Logged In User) action which you SUM up those properties in the total income property. Also add the + symbol which you have missed to add in the above video.
Thank you and have a great day!
Hello,
I thought it had to always be login user so that the updated info only changes the collection linked to the login user? thanks.
Hi @carpantry1986,
In the form, the properties used for SUM in the total income property have been already mapped with filtering to logged in user and updated by adding them in the automatic fields section. So with the update action, you simply SUM those already mapped data in the row instead retrieving those data again with individual SUMs.
Thank you and have a great day!
Hello,
Thanks for the info, it clarifies the logic process of how it is calculated and in what order.
Hello,
yes, this fixed my issue with saving the data in the collection. Thanks for your time and help.