Validating data for 3 elements / autobiding / repeating group

I have a place where user can add price for 3 elements.
The main element and it’s 2 split parts (A and B).
image
This group is done in the “pivot way” - meaning - the main repeating group returns the category of the cost and the inputs look for first item of main price and split prices for A and B. Simple.

Now the question - what is the the best way to make a validation, for edition of those values (they are autobound, but to exit the edit mode, user need later to press a button) that in every row (category of cost) I check if split values always add up to main one?
They can be split in all possible ways - meaning 0 and 100% or 50/50.
There can be multiple categories of costs for every item.

If I understand correctly, you have a repeating groups with multiple rows and 1 single “Valide” button on the outside of the RG.

You want this button to validate ALL rows at once.

For this use case, native Bubble does not allow you to pass data between inside the RG and the page where it is.
You’ll need a plugin, one of the most used is called Orchestra.

It allows you to trigger a workflow inside the RG, from outside.
Doing so you might be abble to have a workflow inside the RG that validates data, all of this being triggers from the Validate button on the page.

1 Like

I will check it.
Thou my repeating group is undoubtfully unique. As all it fields are searches.
Syntax below:

  1. Repeating group displays groupings of cost types.
  2. There are 3 rows - in first I search for first item where cost belongs to main, second row - for part A, thirds for part B.
  3. So the row is just a grouping, not a real element itself.

You can work this out with the GNS Plugin made by Guillaume. With this plugin, you can get data out of RG and for example make a comparison in a hidden grp.

@philipp.laengle107 I cannot find this plugin. What is it’s name?

Ah sorry its called BNS: [New Plugin] BNS - Global Custom States [EDIT] :slight_smile:

1 Like

Unfortunatelly I didn’t manage to use this plugin and solved this in a not very optimized way.
I calculate the fields on the frontend and make them invalid if anything is off plus work based on custom state.
Plus I have a validation on the button - which counts all A+B if they equal the sum. And this one takes a second, but it’s better than nothing. Thanks for help.