Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7993459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:51:23+00:00 2026-06-04T13:51:23+00:00

CF8 I was using this line to get the MIN value of a query

  • 0

CF8

I was using this line to get the MIN value of a query column. I just noticed a null value in a recordset causes an error. Is there a simply way to tell ArrayMin to skip nulls w/o having to loop the column and load an array with all non-null values?

<cfset temp_data_min = #round(ArrayMin(query_x["some_field"]))#>

thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:51:25+00:00Added an answer on June 4, 2026 at 1:51 pm

    You could loop through your array and create a new array that doesn’t contain any null values. Then apply the ArrayMin function to the new array.

    <cfset newArray = []>
    <cfloop index="x" array="#query_x["some_field"]#">
      <cfif x NEQ 'null'>
          <cfset arrayAppend(newArray, x)>
      </cfif>
    </cfloop>
    <cfset temp_data_min = round(ArrayMin(newArray))>
    

    NOT TESTED

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using CF8 and SQL2000. I'm storing a bunch of HTML in a Text
I have a site using CF8 and Fusebox 5. Anytime I need to add
Anything one should watch out for when using CF8's CFFEED tag? Oh, here's a
We have been using EHCache with CF8 for a while now with no issues.
coldfusion.compiler.FactoredNodeAggregation cannot be cast to coldfusion.compiler.ASTfunctionDefinition I get the above error when attempting to
In a CF8 form, I'm using a tag such as the following: <cfinput type
I am building an application that performs a master query with many joins. This
I'm trying to do integration with Salesforce using their REST API and CF8. I
I'm creating a timestamp in CF8 using a custom function. It's then being passed
I am using CF8 and MySQL 5. I have a form with several date

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.