Expand my Community achievements bar.

SOLVED

In excel I use COUNTIF. What do I use in LC?

Avatar

Level 1

In excel I use COUNTIF to keep record of how many times a certain option in a dropdown box are chosen. Is there a way to get the same result in adobe LC?
Thanks,

1 Accepted Solution

Avatar

Correct answer by
Level 8

xfa.resolveNodes('DropDown.[$.rawValue=="A"]').length;

This will return an integer where 'DropDown' is the name of all your in-scope drop downs and 'A' is the value you are looking to count.

Kyle

View solution in original post

3 Replies

Avatar

Correct answer by
Level 8

xfa.resolveNodes('DropDown.[$.rawValue=="A"]').length;

This will return an integer where 'DropDown' is the name of all your in-scope drop downs and 'A' is the value you are looking to count.

Kyle

Avatar

Level 1

I type in: "xfa.resolveNodes('DropDownList1[*].[$.rawValue=="1"]').length;"

It gives me the error of "syntax error token"

Thanks,