From the image, it looks like you are using a Repeater field, which it’s name is unknown to me, so I use use the name “repeater_name” for now.
- The comparison formula should go in the “Bigger Weight” field.
But all that probably does not matter at this point because the Max function is an aggression function. Meaning that you can get the Max. value in a column and not values from a row (which is what you are trying to do). Also, your referencing the subfields were incorrect too. When it comes to referencing subfields, you do it like this – Max(repeater_name.weight). I don’t think you can have 2 subfields inside the Max function (I have not tested this).
After saying all that, unless I’m missing something, what you want, cannot be done with this plugin. You have to use php and create a loop for the Repeater field, and in each cycle get the values of the 2 subfields (weight, and volumetric_weight), have an if/else condition to get which value is greater, also check if the numbers are equal, and set the resulting value in the Bigger Weight subfield. At this point, the resulting data will only be shown on the front end, so if you want to also be saved in the database, you have to do the extra step and save it to the database. The loop will keep doing this until the Repeater field runs out of records (rows).
If I can think of a way to accomplish what you want with this plugin, I’ll let you know here, but without testing things out, just thinking out loud, I cannot think there is any way to do what you want, you have to do things manually with php I’m afraid.
-
This reply was modified 2 years, 2 months ago by
nick6352683.