Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Benannte Felder zählen, wenn Sie einen Wert enthalten

New Here ,
Feb 17, 2025 Feb 17, 2025

Ich habe ein Formular mit den Textfeldern für Wochentage Montag - Sonntag. Ich möchte die Felder zählen, in den ich einen Zahlwert eingetragen habe um zu ermitteln, ob ich eine 5 oder 6 Tage Woche erhalte. Hat jemand eine Idee?

TOPICS
PDF forms
156
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2025 Feb 17, 2025

So you want to count how many fields in a group are filled in, basically? What are the names of those fields?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 17, 2025 Feb 17, 2025

Mo Di Mi Do Fr Sa So

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2025 Feb 17, 2025
LATEST

OK, then you can use this script as the custom calculation script of a text field to show how many fields in the group have a value:

 

var fields = ["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"];
var cnt = 0;
for (var i in fields) {
	var f = this.getField(fields[i]);
	if (f.valueAsString!="") cnt++;
}
event.value = cnt;
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines