Copy link to clipboard
Copied
ciao a tutti, vorrei calcolare il valore AB(quante volte viene trovato questo valore) nei camp1- camp8-camp15-camp22-camp29-camp36-camp43, sono posti in orizzontale
grazie
Copy link to clipboard
Copied
Hi @Felice29189474k2dv,
Hope you are doing. Thanks for writing in!
If you are looking for a solution, you can try the below steps:
If you want the count to automatically update in a specific form field (e.g., "AB_Count"), follow these steps:
var fields = ["camp1", "camp8", "camp15", "camp22", "camp29", "camp36", "camp43"];
var count = 0;
for (var i = 0; i < fields.length; i++) {
var value = this.getField(fields[i]).valueAsString;
if (value == "AB") {
count++;
}
}
event.value = count; // Set the count as the value of the AB_Count field
Hope this helps.
-Souvik
Find more inspiration, events, and resources on the new Adobe Community
Explore Now