Skip to main content
Inspiring
October 6, 2008
Question

CFC Error -pass parameters

  • October 6, 2008
  • 6 replies
  • 869 views
Can anyone point out a solution this error? Thank you in advance...the BossEID is not blank...

The parameter CCFBOSSEID to function update is required but was not passed in.


The error occurred in C:\Inetpub\wwwroot\Scorecard33\admin\ccf\bridge\act_csv.import.cfm: line 82
Called from C:\Inetpub\wwwroot\Scorecard33\parsed\bridge.csv.cfm: line 30
Called from C:\Inetpub\wwwroot\Scorecard33\fusebox5\Application.cfc: line 228
Called from C:\Inetpub\wwwroot\Scorecard33\fusebox5\Application.cfc: line 218
Called from C:\Inetpub\wwwroot\Scorecard33\fusebox5\fusebox5.cfm: line 57
Called from C:\Inetpub\wwwroot\Scorecard33\index.cfm: line 3

80 : <cfset MyCSV.update(EID, ccfLevel, CCFRole, CCFTeamID,CCFlocationID, status,
81 : CSGID, SalesRep_id, Peoplesoftid, AvayaID,
82 : first_name, mi, last_name, hiredate, CCFBossEID)>
83 : <cfelse>
84 : <li>Adding...</li>


    This topic has been closed for replies.

    6 replies

    emmim44Author
    Inspiring
    October 6, 2008
    You are right man...Thank you guys...
    emmim44Author
    Inspiring
    October 6, 2008
    They said leave it null or blank... depends on db ...

    Also, even I set a default value for status, how come 'Work_status' is not being updated with the default value = 'FTE' ??

    <cfargument name="status" type="string" required="false" default="FTE">

    <cfif arguments.status NEQ "">
    Work_status = <cfqueryparam cfsqltype="CF_SQL_CHAR" value="#arguments.status#">,
    <cfelse>
    Work_status = '#arguments.status#',
    </cfif>
    Participating Frequently
    October 6, 2008
    Because the default value is only used if status isn't being passed into the function. If it's being passed in, even if it's null or an empty string, the function is going to use what you passed in.
    Participating Frequently
    October 6, 2008
    How else do you think Coldfusion matches up what you're passing in?

    When you call it using <cfinvoke...>, you explicitly tell CF which argument each parameter applies to in your <cfinvokeargument...> tags. When you call it as you do, using a comma-delimited list of variables, the only thing CF has to go on is the order of the parameters you're passing in, and the order of the arguments defined in the function.
    emmim44Author
    Inspiring
    October 6, 2008
    Are the order of cfarguments important when sending the parameters to the function?
    Inspiring
    October 6, 2008
    quote:

    Originally posted by: emmim44
    Are the order of cfarguments important when sending the parameters to the function?

    Only when you use the method you attempted.
    emmim44Author
    Inspiring
    October 6, 2008
    Lets say if some of the CCFBossEID are blank, what do you suggest then?
    Participating Frequently
    October 6, 2008
    Always put any arguments that aren't required as the last arguments in your <cffunction>
    Inspiring
    October 6, 2008
    If you are convinced that it's not blank, make sure that you have an exact match between the variables you are sending to your function and the cfargument tags. I notice one of them was commented out.