Expand my Community achievements bar.

SOLVED

AEM instance manager added row locales not changeable by script

Avatar

Level 2

Hi I have managed an Invoice template by: 

 

Table1._Row1.addInstance script. 

 

And also I have managed a drop down menu to change local currency (time to time we need to issued invoices in different currences).

The change local command only applies to 1st row, but not the rows added by instance manager. 

 

I have tried to manage directly adding the script inside dropdown click to row numeric field by calculate however I receive invalid value error message while calculating.  

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi Mayank, thanks. I will have a look into that soon

View solution in original post

3 Replies

Avatar

Employee Advisor

@Krm974 You have to iterate it for all the instances. something one these lines:

 

var rowCount = Page1.panel.instanceManager.count;
for (var  i=0; i<rowCount; i++)
{
var path = "form1.Page1.panel.Sub2[" + i + "]";  // cell/repeatable field you want to set
xfa.resolveNode(path).rawValue= somevalue;

 

}

Avatar

Correct answer by
Level 2

Hi Mayank, thanks. I will have a look into that soon

Avatar

Level 2

Hi Mayank, I tried to adapt your code, however it did not work at all. Probabaly I am not having a correct adaptation. Could you please assist me If yo ucan with the attached sample pdf form. 

 

If you can apply the code yourself, I can understand how to do...

 

Best Regards,

 

https://drive.google.com/file/d/19f1Iph4g880juw5cDvUIWhtORJRb-DWT/view?usp=sharing