AEM Adaptive forms Table , how to find if its the last instance of the table using script in rule editor? | Community
Skip to main content
March 4, 2024
Question

AEM Adaptive forms Table , how to find if its the last instance of the table using script in rule editor?

  • March 4, 2024
  • 2 replies
  • 1030 views

Hi all, I have AEM forms Table connected to Schema binding, The rows of table repeats as per the amount of items present in the schema, Is there any event , or technique i can use to trigger a specific script only at the last instance of the table row, and not when every row is getting generated? Any help ideas would be helpful.

thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Level 4
March 6, 2024

I think triggering your script from Table::ready:layout  

komatsu20Author
March 7, 2024

Thank you, but i should have mentioned this is Adaptive Form table where these rows are repeating. Thanks Again

Level 4
March 7, 2024

Try triggering from "Table - Visibility" or a parent panel.

New Member
March 17, 2024

this.instanceManager.instanceCount - used to determine total number of repeatable instances/rows

this.instanceIndex - used to fetch current row index#(typically starts from 0,1,2..)

 

if(this.instanceManager.instanceCount === this.instanceIndex+1)

{

//add specific script for the last instance/row

}