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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:05:11+00:00 2026-06-06T22:05:11+00:00

<cfparam name=airInfo.leaving type=struct default=#structNew()#> <cfparam name=flightInfo.depart type=string default=departing> <cfparam name=flightInfo.arrive type=string default=arriving> <cfset flightInfo

  • 0
<cfparam name="airInfo.leaving"     type="struct" default="#structNew()#">
<cfparam name="flightInfo.depart"   type="string" default="departing">
<cfparam name="flightInfo.arrive"   type="string" default="arriving">

<cfset flightInfo   = airInfo.leaving>
<cfset fromInfo     = flightInfo.depart>
<cfset arriveInfo   = flightInfo.arrive>

<cfdump var="#flightInfo#">

This should work… I think, but I keep getting an error saying depart is undefined in flightInfo. I know I could use if structKeyExists() but this is just a snippet of a larger application. I can’t be checking all the variables in that mannor, and really need to use cfparam. What am I missing from this?

  • 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-06T22:05:13+00:00Added an answer on June 6, 2026 at 10:05 pm

    Perhaps the second and third cfparams should be setting airInfo.depart and airInfo.arrive instead of flighInfo.depart and flightInfo.arrive.

    EDIT: I should mention that your flightInfo variable gets overwritten by the empty struct that you create in the first cfparam and that’s why you get the undefined error.

    If your intent is to default flightInfo with depart and arrive, you should set those variables in airInfo.leaving as in airInfo.leaving.depart and airInfo.leaving.arrive and then assign airInfo.leaving to flightInfo.

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

Sidebar

Related Questions

<cfparam name=attributes.mytestvalue default=0> <cfdump var=#attributes#> <!--- Attributes are there. ---> <cfdocumentSection> <cfdocumentitem type=footer> <cfdump
<cfif ISDEFINED(CALLER.VARIABLES.STRFUNCNAME)> <cfparam name=strFuncName default=#EVALUATE(CALLER.VARIABLES.STRFUNCNAME)# /> <cfelse> <cfparam name=strFuncName default= /> </cfif> This code
Hi I have a CFC/component by name tsks_Session, that performs the session tasks. In
I'm working with ColdFusion trying to read the value stored in a session cookie
I have a facebook application that was using a CFC I had found on
I am new to programming so bear with me. I have an XML document
I am new to programming so bear with me. I have many XML documents
What's the difference between these two blocks of code, when called right after a
I need to pass a structure to a method, but it will not always
I have received this error Element CUSTOMERID is undefined in CLIENT. D:\Inetpub\wwwsitecom\wwwroot\rders.cfm:296 on a

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.