# RowNo with parameter?

**URL:** <https://community.easymorph.com/t/rowno-with-parameter/213>\
**Category:** General Q&A\
**Created:** [July 17, 2017, 11:41am UTC](https://community.easymorph.com/t/rowno-with-parameter/213 "2017-07-17T11:41:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaleelahamed](https://community.easymorph.com/user_avatar/community.easymorph.com/kaleelahamed/32/166_2.png) [@kaleelahamed](https://community.easymorph.com/u/kaleelahamed)\
**Post date:** [July 17, 2017, 11:41am UTC](https://community.easymorph.com/t/rowno-with-parameter/213/1 "2017-07-17T11:41:35Z")

</div>

Hello All,

Currently I am trying to append rows to an existing table using easy morph. So my intention is to get the Maximum key from a source table and add +1 and so on for every row that is generated, so I can insert with correct key for the appended rows.

for example the maximum key in the source table is 3000. And I am generating around 100 records to be written to target table.

In this case, for the 100 rows I generate, it needs to have one column with value as 3001 for first row, 3002 for second row, etc.,

Is this possible in easymorph?

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [July 17, 2017, 3:20pm UTC](https://community.easymorph.com/t/rowno-with-parameter/213/2 "2017-07-17T15:20:40Z")

</div>

Hi @kaleelahamed,

you will need to get Max key from the source table then bring it into the table with new records using the Peek transformation (see [Tutorial: Transformations for merging data](http://easymorph.com/learn/transformations-merging.html)). Then you can calculate new keys as row number + Max key.

See the example below. "Season" is the key field in it.

[Teams.sqlite](https://community.easymorph.com/uploads/default/original/1X/89d7882673c9d6943b126ba074c790ada538bcb5.sqlite) (7 KB)  
[db\_append.morph](https://community.easymorph.com/uploads/default/original/1X/360dace74f2cdb30fa675a612e82d18d3d217b7c.morph) (4.9 KB)

 ![](https://community.easymorph.com/uploads/default/original/1X/faf40da5a7a692677eb7188a082b6b5c7ef28c91.png)

---

<div class="post-metadata">

**Author:** ![kaleelahamed](https://community.easymorph.com/user_avatar/community.easymorph.com/kaleelahamed/32/166_2.png) [@kaleelahamed](https://community.easymorph.com/u/kaleelahamed)\
**Post date:** [July 18, 2017, 8:51am UTC](https://community.easymorph.com/t/rowno-with-parameter/213/3 "2017-07-18T08:51:09Z")

</div>

Thank you so much 👏. This is really helpful. With the idea you provided, I was able to do clean task end to end for my simple requirement 🙂
