AEM instance manager added row locales not changeable by script | Community
Skip to main content
New Participant
July 13, 2022
Solved

AEM instance manager added row locales not changeable by script

  • July 13, 2022
  • 1 reply
  • 906 views

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.  

 

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

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

1 reply

Mayank_Gandhi
Employee
July 14, 2022

@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;

 

}

Krm974AuthorAccepted solution
New Participant
July 15, 2022

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