The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Using [frm-stats] minimum


This Discussion is public



Could anyone help me with the following problem please, I'd be very grateful. I am trying to compare to values (two id's) and display the minimum of the two in another field. I have read the article about using frm-stats minimum but can't see how I use it with two separate id's.

Thanks in advance,


Please post your code.

Hi Vfontjr,

I've tried

[frm-stats id="136,137" type=minimum]

but with no success. Do I need to somehow combine the two ID's (values) before using the shortcode. I am a little confused.



frm-stats minimum retrieves the lowest value from a single field id across ALL form entries that include a value in that field. This is not going to work for you to get the minimum value from 2 fields.

What exactly do you want to accomplish?

Are you comparing the values of 2 fields across all entries in the database and then select the lowest value that exists?

Or, are you comparing the lowest value of 2 fields in a single entry?

Please explain with a little more detail.

Ahaa, thanks.

I am trying to compare the lowest value of 2 fields in a single entry. I am a personal trainer and I am using a form to assess a client. The scores for a movement are broken down to the left side and right side of the body. The Overall score is the lowest of the two. I have two fields that are on a scale and would like the lower value displayed in a separate field for totalling up at the end.

I hope that helps.

Then you don't need to use frm-stats. You can calculate this right in the form and save the value in a hidden or other type of field.

In the field used to store the overall score, use this formula as a calculation in the Dynamic values section:

Math.min( [field1], [field2] )

Thank you very much! I appreciate the code. Thank you!

Discussion closed.