Hello,
I have a dropdown with two text selections (Account, Survey) in a repeatable Subform.
Then I have two fields adding the selections. # of Accounts per Region____ # of Surveys per Region ___.
If I add 10 repeatable rows selecting Account 6 times and Survey 4 times, how to write the script or form calc to sum the selections?
Thank you!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You'll probably have to change the code to suit your field names and form structure but this JavaScript should do it in the calculate event of the “# of Account/Survey Reviews per Region” fields
xfa.resolveNodes('Table1.Row1.[ReviewType == "Account"]').length;
and
xfa.resolveNodes('Table1.Row1.[ReviewType == "Survey"]').length;
Here’s a sample to make sure of the code, https://sites.google.com/site/livecycledesignercookbooks/home/PCForm.pdf?attredirects=0&d=1
Regards Bruce
Views
Replies
Total Likes
Hi,
You'll probably have to change the code to suit your field names and form structure but this JavaScript should do it in the calculate event of the “# of Account/Survey Reviews per Region” fields
xfa.resolveNodes('Table1.Row1.[ReviewType == "Account"]').length;
and
xfa.resolveNodes('Table1.Row1.[ReviewType == "Survey"]').length;
Here’s a sample to make sure of the code, https://sites.google.com/site/livecycledesignercookbooks/home/PCForm.pdf?attredirects=0&d=1
Regards Bruce
Views
Replies
Total Likes
Thank you!!!!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies