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

**URL:** https://forum.servoy.com/t/the-function-is-not-applicable-for-the-arguments/16782
**Category:** Classic Servoy
**Created:** [November 26, 2012, 3:04am UTC](https://forum.servoy.com/t/the-function-is-not-applicable-for-the-arguments/16782 "2012-11-26T03:04:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![djlapin](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@djlapin](https://forum.servoy.com/u/djlapin)
#### Post date: [November 26, 2012, 3:04am UTC](https://forum.servoy.com/t/the-function-is-not-applicable-for-the-arguments/16782/1 "2012-11-26T03:04:01Z")

</div>

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 –

```auto
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,

```auto
**
 * 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

---

<div class="post-metadata">

### Author: ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)
#### Post date: [November 26, 2012, 9:07am UTC](https://forum.servoy.com/t/the-function-is-not-applicable-for-the-arguments/16782/2 "2012-11-26T09:07:48Z")

</div>

> 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:

```auto
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;
   }

```

---

<div class="post-metadata">

### Author: ![djlapin](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@djlapin](https://forum.servoy.com/u/djlapin)
#### Post date: [November 28, 2012, 10:32am UTC](https://forum.servoy.com/t/the-function-is-not-applicable-for-the-arguments/16782/3 "2012-11-28T10:32:35Z")

</div>

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

---

<div class="post-metadata">

### Author: ![djlapin](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@djlapin](https://forum.servoy.com/u/djlapin)
#### Post date: [December 4, 2012, 6:24am UTC](https://forum.servoy.com/t/the-function-is-not-applicable-for-the-arguments/16782/4 "2012-12-04T06:24:34Z")

</div>

Hi Mar,

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

```auto
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

---

<div class="post-metadata">

### Author: ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)
#### Post date: [December 4, 2012, 6:59am UTC](https://forum.servoy.com/t/the-function-is-not-applicable-for-the-arguments/16782/5 "2012-12-04T06:59:57Z")

</div>

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

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

```
