Expand my Community achievements bar.

SOLVED

InstanceManager problem

Avatar

Level 7

Hi,

i am trying to add subform using instanceManger.addInstance(true); on a button click event. But subform/instance is not getting added.

I have created a POC sample and attaching an screenshot. Please let me knwo the issue why i am not able to add subform.

InstanceManager.JPG

regards

Sunil

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi Sunil,

Due to some reasons i'm not able to mail you your form. But, see the solution below:

1) Set the "Subform1" binding property as : "Repaeat Subform For Each Data Item".

This would solve your problem.

Also, you need to set your Page1 to flow content. If not, when you add more instances your instances will go beyond the submit button without moving the button down.

Thanks,

VJ

View solution in original post

6 Replies

Avatar

Former Community Member

Hi Sunil,

You will have to add the following on the click event of the button (not on the click event of the text field).

form1....(remaining path of subform).instanceManager.addInstance(true);

Thanks,

VJ

Avatar

Level 7

sorry for attaching wrong screenshot..

but yes i did as you described above but still there is not achievement. I am still  having same issue, not able to add instance of the subforms.

Regards

Sunilcorrected Instance.JPG

Avatar

Former Community Member

Hi SG,

I think the code you have written is correct.

I suspect that the subforms "Topsubform" and "Subform1" are not set to flow content.

However, if you dont have any problem pls mail me your form to the id kvdvijaykumar@gmail.com

Thanks,

VJ

Avatar

Level 7

Thanks Vijay.. I mailed you the form on your id. Thanks for helping me .

Regards

Sunil

Avatar

Correct answer by
Former Community Member

Hi Sunil,

Due to some reasons i'm not able to mail you your form. But, see the solution below:

1) Set the "Subform1" binding property as : "Repaeat Subform For Each Data Item".

This would solve your problem.

Also, you need to set your Page1 to flow content. If not, when you add more instances your instances will go beyond the submit button without moving the button down.

Thanks,

VJ

Avatar

Level 7

VJ,

thanks alot.. now its working fine. thax

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----