Do subtotal of calculation of 2 fields in repeating group

Hi there.

I’m working on repeating group. Please see picture here.

The last column is Annual Rate column x no. of policy.

How can I do the subtotal for last column ? I can’t find the right way to do this.

Thank you in advance.

create a new number field called calculated, hide a number input in the cell of the repeating group, tell the inputs initial content to be current cells annual rate x current cells no of policys. turn auto binding on the number input and setup the privacy rule to allow auto binding. no simply have the total count the :sum of calculated by dosearchfor using contraints.

Hi @Jarrad,

Thank you for your reply. I’m trying what you mentioned. However it’s not working right. Maybe I’m not quite understand how to do it correctly.

I will add more in detail here. From table above.

  1. Annual Rate - I just query from DB with key “coverage” from column 2.
  2. No. of policy - I have a list to keep coverage in it.
    Data is here: [200000,300000,500000,5000000,5000000,5000000]
    Then I count with the same coverage and display.
  3. Last column - I multiply Annual rate with no. of policy (Annual rate x No. of Policy)

So, what I want to display is the total of all policies. From table above, it should calculate as follow:
1,000+1,500+2,000+51,000 = 55,500.

Thank you in advance. :blush:

give me a minute i will do an example up

is there any reason that you have lists of coverage?

Alright. I will explain as below.

  1. user wants to have total coverage at one amount. Let say 16M.
  2. however, there are specific products available (limited amount of coverage. ex. 200,000 , 300,000 , 1M, 2M, 5M etc.)
  3. I have to find out the combination of product that total amount sum up at 16M.
  4. from item 4, I will get coverage list as following: 200,000x1 , 300,000x1 , 500,000x1 , 5Mx1 to get 16M

This is why I need coverage list for. Then I will search in DB and calculate how much to pay for each coverage. such as 200,000 --> pay fee 1,000. etc.

In summary, I have to display if coverage = 16M, how much user have to pay for fee in total.

I wish this will help to clarify my work. :slight_smile:

Very appreciated.

So if you have say product1, is the data -

Product1 200,000 1,000 1 1,000 and thats the record

Or

Product1 200,000 1,000 1 1,000
300,000
250,000
(As list)

Sorry about the formatting in on my phone at the moment.

I create sample as following:

I hope this can help to clarify my issue.

:smile:

Thank you.

This is the editor part.

Got you now. Can you message me the edit link please I will have a quick look now.

I sent the edit link, can you get the access ?

No it’s just redirecting to bubble… check private/public setting while I try without version-test

I did set project as public. But how to make it edit link !!!

You just open it in your browser and copy the URL

Is it right ?

No it’s still not working.

https://bubble.io/page?name=index&id=coveragetemp&tab=tabs-1

I tried to get in from other account. it’s working fine.

im in… I swear I reformatted it like that… oh well. Give me a sec.

This is easy dude, I’m on my phone so I will show you the rule… since your only going to have 10 or so cells even if it’s 20 that’s ok too… just keep adding #3 then #4 and so on… the number 1 relates to the first cell and so on.

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