Repeating Group II

Hi,

Rookie problem here & probably been asked & answered a thousand times but this has been doing my head in for days now & it REALLY can’t be half as hard as I’ve made it.

I have a freight route split into several legs, each with a leg rate showing in the leg row of a repeating group. The rate is determined once the user adds the legs destination. The intention is to allow the user to build the required freight route per booking to perform the job (see below).

So I simply want to add the rates to get a total at the bottom…that’s it. I’ve tried searching for each job with booking number = parent booking (binded fields), tried several varying methods with unbinded fields, even purchased the BDK RG Tool to do exactly this (or so I thought)…still zippo.

I am a trucker though…so hey, you know. Any & all assistance sincerely appreciated…

The BDK RG tools should do the trick here. You’ll need to place the RG Extractor into cell 1 of your repeating group, and then set the data spurce and type for column 1 (it looks like yours would be your Base input field’s value). Place the RG Data element outside of the RG. In your ‘Total’ field, have the data source be ‘RG Data Column 1 List: Sum’ (the sum is important as it’ll total all of the values together).

Let me know if this works!

G’day,

Yes, I thought this plugin would solve the problem, there’s obviously something I’m failing to understand here. I had another shot at it & set it back up the way you described (which is how I initially had it) but still can’t seem to get the expected result (please see below):

The setup is shown below also:

Thanks for taking an interest & the time to suggest the above, appreciated…

What happens if you use a text field for you total instead of an input field? Does it display the total as expected? Sometimes input fields can be weird when not populated by a human.

Hang on, I’ll give it a shot. I also tried binding the elements directly to the DB then using:

Search for Jobs (where Booking=Parent Booking): for each Rate:sum

But it didn’t seem to like that either?! I only discovered Bubble a couple of weeks ago so my knowledge is very limited at this point. From what I’ve read here on the forum however there seems to be no simple way of adding a RG field…I’m hoping Bubble hasn’t got too many more of these little idiosyncrasies, this has taken a ridiculous amount of time, reading & trials & I’m still unable to sum a simple number.

Give me a minute…thanks.

Is this what you meant?

It’s 4am here in Australia, start of another beautiful day…I need to get to work so I’ll say thank you & good evening & check here this evening for any further suggestions you may have. Otherwise, I do sincerely appreciate your help, it’s really frustrating when you spend hours/days on something so simple & it doesn’t work.

I don’t know where to find the information specific to this problem either, perhaps someone can point me to the section of the manual that explains the hows & whys (I can’t find it) so I can gain a proper understanding of what’s going on here.

Anyway…thank you.

1 Like

Sorry…what did you mean by “…when not populated by a human.”

I meant the difference between an input showing a dynamically generated value vs when a person puts the value in.

I DID notice though what I think your issue is - I realized your base input values are showing light grey, which typically means you have it set as the Placeholder and not the Initial content. Trying turning off Autobinding with this as well. I’m actually really curious what your data structure and invoice structure is too. Would you mind DMing me a link to your editor and I can try and poke around later tonight? (It’s afternoon in California!)

Hello again, sorry for the tardy response, been a busy week & haven’t had a chance to get back to this. May I ask a couple of questions to be sure I understand what’s happening here:

  1. What effect does the placement of any logic/calculations have (i.e. Placeholder vs Initial Content vs Default Value, etc.)?

  2. For Dynamic Inputs, that are calculated dependent on the value of other fields rather than receiving user input, what is the field type to use (e.g. dropdown, input, body, etc.) & what are the ramifications of each?

  3. I’d be happy to get a second opinion on the data structure, I find the list field concept a little counter intuitive so have possibly erred away from it’s use where perhaps I should have used it. I was intending to have a restructure this weekend to have the Legs appear as a Trip field in the Booking (parent) where a Trip is a list of Legs (one or more). Currently I have a Booking field in each trip relating the two data types together, not sure which is the strongest relationship method in the Bubble world?

  4. Finally, so you’re suggesting I don’t bind any of the form fields, switch the field/input for Base Total to a standard input (it’s not actually an input would a text field be more appropriate) with a text data type & ensure the logic is in the initial content field…have I read that right?

Sorry for the questions, thanks for your time & I hope I’ve understood…

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