# Constellation 24.1 - Recalculate sequence number in embedded data table after add/delete row

**URL:** <https://forums.pega.com/t/constellation-24-1-recalculate-sequence-number-in-embedded-data-table-after-add-delete-row/13202>\
**Category:** User Experience\
**Tags:** constellation, user-experience\
**Created:** [August 18, 2026, 11:39pm UTC](https://forums.pega.com/t/constellation-24-1-recalculate-sequence-number-in-embedded-data-table-after-add-delete-row/13202 "2026-08-18T23:39:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![VinayY88](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@VinayY88](https://forums.pega.com/u/VinayY88)\
**Post date:** [August 18, 2026, 11:39pm UTC](https://forums.pega.com/t/constellation-24-1-recalculate-sequence-number-in-embedded-data-table-after-add-delete-row/13202/1 "2026-08-18T23:39:54Z")

</div>

I am using **Pega Constellation 25.1** and have an embedded data table **Payment Schedule** (list of records) within a case type.

Each Payment Schedule record contains:

- Name (Contractor Name)
- PaymentSchedule (read-only numeric field)
- Other payment-related fields

**Requirement:**

The PaymentSchedule field must be sequential per contractor.

Example:

1 Contractor A | PaymentSchedule 1

2 Contractor A | PaymentSchedule 2

3 Contractor A | PaymentSchedule 3

4 Contractor B | PaymentSchedule 1

5 Contractor B | PaymentSchedule 2

If a row is deleted, the remaining rows for that contractor must be re-sequenced.

Example:

1

Before delete"

1 Contractor A | 1

2 Contractor A | 2

3 Contractor A | 3

4 Contractor A | 4

5 Contractor A | 5

Delete row with PaymentSchedule = 3

After delete:

1 Contractor A | 1

2 Contractor A | 2

3 Contractor A | 3

4 Contractor A | 4

**Challenge:**

In Constellation, I am using the standard embedded data table with Modal add/edit records. I do not see an OOTB way to:

- Run a Data Transform after Add Row
- Run a Data Transform after Delete Row
- Run post-processing when a modal record is saved
- Trigger recalculation when the built-in table actions are used

**Questions:**

1. Is there an OOTB way in Constellation to execute a Data Transform after adding or deleting a row from an embedded data table?
2. Is there a recommended approach to dynamically generate row sequence numbers within a pagelist based on another field value (Contractor Name)?
3. Would this require a custom DX component/action, or is there a Constellation-supported pattern for this use case?

Any examples or recommended design patterns would be appreciated.

---

<div class="post-metadata">

**Author:** ![imGaurav](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/imgaurav/32/23708_2.png) [@imGaurav](https://forums.pega.com/u/imGaurav)\
**Post date:** [August 19, 2026, 4:19am UTC](https://forums.pega.com/t/constellation-24-1-recalculate-sequence-number-in-embedded-data-table-after-add-delete-row/13202/2 "2026-08-19T04:19:30Z")

</div>

in the Post Processing use the Function: @RemoveDeletedObjects to cleanup the embeded data objects.

---

<div class="post-metadata">

**Author:** ![Sohan\_Reddy\_Anugu](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/sohan_reddy_anugu/32/23559_2.png) [@Sohan\_Reddy\_Anugu](https://forums.pega.com/u/Sohan_Reddy_Anugu)\
**Post date:** [August 19, 2026, 9:42am UTC](https://forums.pega.com/t/constellation-24-1-recalculate-sequence-number-in-embedded-data-table-after-add-delete-row/13202/3 "2026-08-19T09:42:57Z")

</div>

hi @VinayY88 Since we are on Pega Constellation, the DX API triggers a refresh event every time a row operation occurs inside the embedded data table. By implementing our re-sequencing logic directly within pyRefreshData, the system will automatically recalculate and update the sequential number property across the entire page list immediately after a row is added or deleted.

---

<div class="post-metadata">

**Author:** ![VinayY88](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@VinayY88](https://forums.pega.com/u/VinayY88)\
**Post date:** [September 6, 2026, 3:35am UTC](https://forums.pega.com/t/constellation-24-1-recalculate-sequence-number-in-embedded-data-table-after-add-delete-row/13202/4 "2026-09-06T03:35:28Z")

</div>

I implemented this logic in the final Submit/Post Action Data Transform rather than putting it in pyRefreshData. If this were handled in pyRefreshData within the embedded class, I would also need to maintain similar logic for edit and delete scenarios to keep the contractor count and Payment Schedule sequence consistent whenever the embedded data changes. That would introduce repeated processing and additional logic across different operations. To avoid that complexity and unnecessary recalculation, I centralized the logic in the Post Action Data Transform, where the Payment Schedule is evaluated by contractor and the sequence/count is finalized only when the user submits the data.
