charles
Posts: 59
|
Posted: 02/11/2009, 4:38 AM |
|
i created the following custom function in codechargestudio to automatically look up an employees costcenter and make it the default for a form field.
'SmartGetemployeeID()
function SmartGetEmployeeID()
SmartGetEmployeeID=CCDLookUp("employee_id","users","UserID=" & Dbconnection1.ToSQL(CCGetuserID(),ccsinteger),Dbconnection1)
End function
'SmartGetcostcenterID()
function smartGetcostcenterID()
smartGetcostcenterID()=CCDLookUp"costcenterID","employees_costcenter","employee_id=" & Dbconnection1.ToSQL(SmartGetemployeeID(),ccsinteger),Dbconnection1)
End function
when i make this a default on a form field and run the page, a get a data mismatch error.
What could i be doing wrong.
Regards,
charles
|
|
|
Chris__T
Posts: 339
|
Posted: 02/11/2009, 12:42 PM |
|
missing a ( in 2nd CCDLookup .....before "costcenterID"
|
|
|
|