Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

addInstance() script not working

Avatar

Level 10

I need to add instance of a Subform.

The subform is contained within a flowed subform.

Its just a basic script but its not working.

See the attached sample PDF.

Any help is appreciated..

Nith

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

The first parameter for the insertInstance is required.

The main issue is that the subform2 that you are repeating is not set in the Object/Binding tab. Tick "Repeating Subform for each Data Item".

That should work,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

The first parameter for the insertInstance is required.

The main issue is that the subform2 that you are repeating is not set in the Object/Binding tab. Tick "Repeating Subform for each Data Item".

That should work,

Niall

Avatar

Level 10

Many Thanks Niall, it works..

Thanks & Regards,

Nith