The function ... is not applicable for the arguments...

I’m getting lots of these on upgrading from 6.0.8 to 6.1.2. I am using @param values in the called methods, in each case.

For example, this snippet, which was fine in 6.0.8 –

if((field_CT >= 293) && (aFieldStr[293-1])) {  
		import_SELPA_central_ethnicity(allowUpdates_B, 6, aFieldStr[293-1], student_uid, fsAssessment['asmt_assessment_id'], studentText, tableNbr_ethnAsmt, aRecsNew, aRecsUpdate, aProblems)
		aRecsRead[tableNbr_ethnAsmt] += 1;
	}

… now generates this warning on “import_SELPA_central_ethnicity” –

The function
import_SELPA_central_ethnicity(Boolean,Number,String,UUID,UUID,String,Number,Array,Array,
Array) is not applicable for the arguments
(Boolean,Number,None,String,?,String,Number,Array,Array,Array)

The beginning of the called method looks like this,

**
 * import_SELPA_central_ethnicity()
 * 
 * 11.19.2012
 * 
 * @param {boolean} allowUpdate_B
 * @param {number} ethnNumber
 * @param {string} ethnCode
 * @param {string} assmt_pk
 * @param {string} student_pk
 * @param {string} studentText
 * @param {number} tableNbr_ethnicity
 * @param {Array} aRecsNew
 * @param {Array} aRecsUpdate
 * @param {Array} aProblems
 *
 * @properties={typeid:24,uuid:"68CB001F-72E8-4C42-BB58-B32635CD6F88"}
 * 
 * 
 * @AllowToRunInFind
 */
function import_SELPA_central_ethnicity(allowUpdate_B, ethnNumber, ethnCode, assmt_pk, student_pk, studentText, tableNbr_ethnicity, aRecsNew, aRecsUpdate, aProblems) {
	var tempText = "";

I tried substituting “UUID” for “string” in the @param definitions for assmt_pk and student_pk, but to no avail. How can I fix these warnings?

Thank you,
Don

djlapin:
For example, this snippet, which was fine in 6.0.8 –

CODE: SELECT ALL
if((field_CT >= 293) && (aFieldStr[293-1])) {
import_SELPA_central_ethnicity(allowUpdates_B, 6, aFieldStr[293-1], student_uid, fsAssessment[‘asmt_assessment_id’], studentText, tableNbr_ethnAsmt, aRecsNew, aRecsUpdate, aProblems)
aRecsRead[tableNbr_ethnAsmt] += 1;
}

… now generates this warning on “import_SELPA_central_ethnicity” –

Hi Don,

the 3rd, 4th & 5th argument in the above code do not match the JSDoc types in the import_SELPA_central_ethnicity function.

Easiest way to fix this is as below:

var _sFieldString = '' + aFieldStr[293-1];
var _uuidStudentUid = application.getUUID(student_uid);
var _uuidAssessmentId = application.getUUID(fsAssessment['asmt_assessment_id']);

if((field_CT >= 293) && (aFieldStr[293-1])) {  
      import_SELPA_central_ethnicity(allowUpdates_B, 6, _sFieldString, _uuidStudentUid, _uuidAssessmentId, studentText, tableNbr_ethnAsmt, aRecsNew, aRecsUpdate, aProblems)
      aRecsRead[tableNbr_ethnAsmt] += 1;
   }

Hi Mark,

So do I keep the {string} designation for assmt_pk and student_pk, rather than changing to {UUID}?

Also, for ethnCode, if the aFieldStr array is a string array, why doesn’t it understand that an element in that array is also a string?

Thank you,
Don

Hi Mar,

This is still not working. I tried creating the UUID variable, _stdntUUID,

var _stdntUUID = application.getUUID(fsStudent['std_student_id']);
import_SELPA_central_disability(true, 1, aFieldStr[88-1], aFieldStr[63-1], _stdntUUID, null, studentText, tableNbr_disabStdnt, aRecsNew, aRecsUpdate, aProblems);

…but I still get an error related to that argument:

The function
import_SELPA_central_disability(Boolean,Number,String,String,String,String,String,Number,Array,Arr
ay,Array) is not applicable for the arguments
(Boolean,Number,String,String,UUID,null,String,Number,Array,Array,Array)

Am I missing something?

Thank you,
Don

A UUID is not a String, it is a different object, try:

var _stdntUUID = application.getUUID(fsStudent['std_student_id']).toString();