# How to get single record from Data type table ?

**URL:** <https://forums.pega.com/t/how-to-get-single-record-from-data-type-table/4385>\
**Category:** User Experience\
**Tags:** 8-7, user-experience, data-management\
**Created:** [April 29, 2023, 8:59am UTC](https://forums.pega.com/t/how-to-get-single-record-from-data-type-table/4385 "2023-04-29T08:59:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nagarjuna\_Saidu](https://avatars.discourse-cdn.com/v4/letter/n/8c91f0/32.png) [@Nagarjuna\_Saidu](https://forums.pega.com/u/Nagarjuna_Saidu)\
**Post date:** [April 29, 2023, 8:59am UTC](https://forums.pega.com/t/how-to-get-single-record-from-data-type-table/4385/1 "2023-04-29T08:59:50Z")

</div>

Hi Everyone,

My requirement is to pull the single record from data type table when click on “Add Member” Button. Then the next record will be added when clicking on button (first record is present). Next 3rd record will be added when clicking the button. Any one please help me

---

<div class="post-metadata">

**Author:** ![Anoop\_Krishna](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/anoop_krishna/32/23458_2.png) [@Anoop\_Krishna](https://forums.pega.com/u/Anoop_Krishna)\
**Post date:** [April 29, 2023, 9:23am UTC](https://forums.pega.com/t/how-to-get-single-record-from-data-type-table/4385/2 "2023-04-29T09:23:32Z")

</div>

@NagarjunaS16644648

1. You use a table layout in the UI and source it with pagelist

2. On clicking add member button, what you will be doing is, pass the index to the data page, and append that result to table layout pagelist.

So in the data type you will have the sequential number against each record. 1,2,3…if not you need a column and maintain this sequential number, which we will be using as index.

Now create a data page with list structure, sources by report definition and add param as index/seqno.

On click of add member button, append result from dpage to pagelist.

AppendTo

. Members

DpageList[index:param.index].pxResults(1)

You need to set param.index before copying result.

param.index= @LengthOfPageList(.Members) +1

---

<div class="post-metadata">

**Author:** ![Bogga](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Bogga](https://forums.pega.com/u/Bogga)\
**Post date:** [May 6, 2023, 4:31pm UTC](https://forums.pega.com/t/how-to-get-single-record-from-data-type-table/4385/3 "2023-05-06T16:31:48Z")

</div>

@NagarjunaS16644648

Pass primary key as parameter to the lookup data page and you can fetch single record from data type.

---

<div class="post-metadata">

**Author:** ![SaiVardhanM16657607](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@SaiVardhanM16657607](https://forums.pega.com/u/SaiVardhanM16657607)\
**Post date:** [May 16, 2023, 10:07am UTC](https://forums.pega.com/t/how-to-get-single-record-from-data-type-table/4385/4 "2023-05-16T10:07:28Z")

</div>

@Anoop Krishna Can you please provide the screenshot. I am getting Target and source field classes should be compatible error.

---

<div class="post-metadata">

**Author:** ![SaiVardhanM16657607](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@SaiVardhanM16657607](https://forums.pega.com/u/SaiVardhanM16657607)\
**Post date:** [May 18, 2023, 2:25am UTC](https://forums.pega.com/t/how-to-get-single-record-from-data-type-table/4385/5 "2023-05-18T02:25:09Z")

</div>

@NagarjunaS16644648will you provide the datatransform screenshot. I am getting error Target and source field classes should be compatible.

---

<div class="post-metadata">

**Author:** ![SaiVardhanM16657607](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@SaiVardhanM16657607](https://forums.pega.com/u/SaiVardhanM16657607)\
**Post date:** [May 18, 2023, 3:05am UTC](https://forums.pega.com/t/how-to-get-single-record-from-data-type-table/4385/6 "2023-05-18T03:05:55Z")

</div>

@NagarjunaS16644648 please provide the screenshot I’m getting Target and source fields must be compatible error.

---

<div class="post-metadata">

**Author:** ![Nagarjuna\_Saidu](https://avatars.discourse-cdn.com/v4/letter/n/8c91f0/32.png) [@Nagarjuna\_Saidu](https://forums.pega.com/u/Nagarjuna_Saidu)\
**Post date:** [May 19, 2023, 5:14am UTC](https://forums.pega.com/t/how-to-get-single-record-from-data-type-table/4385/7 "2023-05-19T05:14:53Z")

</div>

@SaiVardhanM16657607

 ![1.png](https://pega1.discourse-cdn.com/pega/original/2X/7/7626a62f561529c0ab41c1e19ff602ac3797922c.png)
