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 217263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:38:27+00:00 2026-05-11T18:38:27+00:00

Update: Based on the answers I initially went the route of using IsInstanceOf() which

  • 0

Update: Based on the answers I initially went the route of using IsInstanceOf() which was designed for this need. However it turned out to be extremely inefficient for some unknown reason. In debugging the app later I ended up just setting some properties on the object to use instead of IsInstanceOf resulting in orders of magnitude speed improvement.

What I am trying to do is test an object in ColdFusion to see what type of component it is. Something like…

<cfif isValid( "compath.dog", currentObj)>
    ...do something specific with dog objects...
</cfif>

I thought this was possible but receive an error saying the type I am passing does not correspond to one in the valid list of types…

Valid type arguments are: any, array, Boolean, date, numeric, query, string, struct, UUID, GUID, binary, integer, float, eurodate, time, creditcard, email, ssn, telephone, zipcode, url, regex, range , component, or variableName.

Is there a way to accomplish this in ColdFusion?

  • 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-05-11T18:38:27+00:00Added an answer on May 11, 2026 at 6:38 pm

    You could also use IsInstanceOf(). Though you must still use the full path, it can also be used to determine inheritance or identify components that implement a particular interface.

    <cfif IsInstanceOf(obj, "compath.Dog")>
       yes. it is a dog component {woof}
    <cfelse>
        some other type of component 
    </cfif>
    
    <cfif IsInstanceOf(obj, "compath.AnimalInterface")>
         yes. it implements the animal interface
    <cfelse>
         no. it must be vegetable or mineral ...
    </cfif>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update: Based on a couple of the answers I have received, I just want
UPDATE: Solved. Thanks BusyMark! EDIT: This is revised based on the answer below from
I am using code to update txtunitprice value based on other on click of
UPDATE: Based on suggestions here, I've modified my code. To get a handle on
UPDATE: Based on rrenaud's great comment I wanted to clarify that although I'm generating
I'm trying to generate an UPDATE command based on Expression trees (for a batch
I'd like to update a page based upon the results of multiple ajax/json requests.
I'm trying to update one table based on values in another table. What's wrong
I am trying to update a column based on another column in the same
This question is based on a previous question: How does C# compilation get around

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.