# JSDoc tag for JSRecord

**URL:** https://forum.servoy.com/t/jsdoc-tag-for-jsrecord/14599
**Category:** Classic Servoy
**Created:** [September 7, 2011, 10:17am UTC](https://forum.servoy.com/t/jsdoc-tag-for-jsrecord/14599 "2011-09-07T10:17:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![log-out](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@log-out](https://forum.servoy.com/u/log-out)
#### Post date: [September 7, 2011, 10:17am UTC](https://forum.servoy.com/t/jsdoc-tag-for-jsrecord/14599/1 "2011-09-07T10:17:58Z")

</div>

Hi, I have this code:

```auto
var incFS = databaseManager.getFoundSet(forms.Incidencia.controller.getDataSource());
incFS.loadRecords("select id_incidencia from " + databaseManager.getDataSourceTableName(controller.getDataSource()) + " where id_incidencia = " + incidencia_id)
var inc = incFS.getRecord(1);

```

If I don’t set the JSDoc tag for **inc** var, if I put this code:

```auto
var x = inc.id_incidencia

```

I receive this warning:

```auto
The property id_incidencia is undefined for the type JSRecord

```

Ok. Then I put this:

```auto
/** @type {JSRecord<db:/dbserver/incidencias>}*/

```

It’s fine, but then **databaseManager.getDataSourceTableName(controller.getDataSource())** is useless because I have to put the server and table names in the tag! If I change the source of the form, the code works fine, but I will receive a jsdoc warning again.

---

<div class="post-metadata">

### Author: ![jasantana](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jasantana](https://forum.servoy.com/u/jasantana)
#### Post date: [September 7, 2011, 11:39am UTC](https://forum.servoy.com/t/jsdoc-tag-for-jsrecord/14599/2 "2011-09-07T11:39:47Z")

</div>

Just keep in mind that JSDoc are only there to let the editor know the properties for that table. As JSDoc is just a comment line will not take effect in the running code, it is used just to check you do not make typos while writting your code.

---

<div class="post-metadata">

### Author: ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)
#### Post date: [September 12, 2011, 3:40pm UTC](https://forum.servoy.com/t/jsdoc-tag-for-jsrecord/14599/3 "2011-09-12T15:40:41Z")

</div>

if you call:

databaseManager.getFoundSet(xxxx)

then the script editor has no idea what kind of foundset you return there.  
Because xxx is just a string that can come from anywhere (so in your example controller.getDataSource())

so you have to type the foundset (or record what you do) that you get out of that call yourself if you know the datasource to be able to validate or code complete it.

Or be use the record dynamic:

```auto
var x = inc['id_incidencia']

```
