# newRecord() question

**URL:** <https://forum.servoy.com/t/newrecord-question/4007>\
**Category:** Classic Servoy\
**Created:** [April 9, 2005, 3:46pm UTC](https://forum.servoy.com/t/newrecord-question/4007 "2005-04-09T15:46:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [April 9, 2005, 3:46pm UTC](https://forum.servoy.com/t/newrecord-question/4007/1 "2005-04-09T15:46:29Z")

</div>

Hello,

I have found out that something like

```auto
relation.newRecord()

```

will return the index of the record created.

At least I found that

```auto
var record = relation.getRecord(relation.newRecord())

```

seems to work. Is it expected bahaviour that a newRecord() always returns the foundset index of the newly created record?

Thanks  
Patrick

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [April 9, 2005, 6:26pm UTC](https://forum.servoy.com/t/newrecord-question/4007/2 "2005-04-09T18:26:42Z")

</div>

Yes, just like:

var a = controller.search()

does return the foundcount.
