Help using min() function

Does anyone have experience with using the .min() function?
I have 2 variables to determine the lowest one:
image
My typed formula isn’t valid… What’s supposed to be there?

The magic wand to get to the Min function has to be applied to a field. Does the field need to be a “collection”?
image
The min() function talks about the min value in a “collection”. What’s a collection and how do I create one if needed?


Next there is a Property… what goes there? Is the {bolt} icon supposed to bind to that collection? Or be a list of the variables separated by commas?
Very confused :slight_smile:
Thank you everyone.

Click on Property and select the column you would like to scan for the minimum value.

For example if you want the minimum value of a column named “price”, then select the price field.

@mebeingken Column? I’m looking to compare 2 variables.
Reading my text above, there are more questions that this answer does not cover unfortunately still confused and unable to use/set it up.
Thank you all,
Stephan

That is not how the min formatter works. It works as Ken explained - it will show the min value of a property/column from a collection.

Understood, so is there another way to compare 2 variables?
Or how do I arrange my variables into a collection?
Im my case, these 4 variables come from 1 DB row, on 2 different columns. So it;s not a case of getting a min from 1 column, but a min from 2 columns in 1 row.

Update, I have 4 variables (not 2 as stated, I wanted to make it easy)
I can always write a recursive

min = var1
if var 2 < min then min = var 2
etc...

But it there a Wappler function to compare # of variables?