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

Stringabfrage

New Here ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Hallo zusammen,
hätte mal eine Frage,

A =this.getField("Artikelnummer.0").value.toString;

if (A = "F.800.600") this.getField("Artikelbezeichung.0").value = "PM14/18 FFH 420-800/FFB 370-600",this.getField("Montagezeit.0").value=60, this.getField("Einzelpreis.0").value="103,83";

else if (A = "F.800.800") this.getField("Artikelbezeichung.0").value = "PM14/18 FFH 420-800/FFB 600-800",this.getField("Montagezeit.0").value=60, this.getField("Einzelpreis.0").value="116,73";

wenn ich dann in das Feld Artikelnummer.0 F.800.600 eingebe, werden die Felder nicht automatisch ausgefüllt. wo hab ich den Fehler gemacht?

mfg

TOPICS
Acrobat SDK and JavaScript , Windows

Views

476

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Apr 03, 2018 Apr 03, 2018

Can you share the form?

Votes

Translate

Translate
Community Expert ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

The comparison operator of JS is " == ", not " = "...

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Danke, aber das funktioniert auch nicht, z.B.: (A=="F.800.600")

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Each getField command has to be separate. You can't separate them with a

comma in the same line of code.

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

You must use following:

if (      ) {

command;

command;

command;

} else if (        ) {

command;

command;

command;

}

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Danke ich werde es gleich probieren

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Dankeschön hat geholfen, aber jetz bekomme ich die Fehlermeldung:

TypeError: this.getField(...) is null

3:Field:Calculate

habe aber schon

A =this.getField("Artikelnummer.0").value.toString();

und

A =this.getField("Artikelnummer.0").valueAsString;

ausprobiert.

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

This happens when the field with this name doesn't exist.

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

But this Field Artikelnummer.0 exist.

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

What happens when you use "Artikelnummer" ?

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Dann kommt im Debugger auch diese Meldung:

TypeError: this.getField(...) is null

3:Field:Calculate

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

The field name is incorrect, or the field itself is corrupt. Did you add it in Acrobat or in another application (like InDesign)?

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Can you share the form?

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

wie kann ich mein PDF teilen, kann nur Bilder teilen?

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Use Tools > Send & Track

and post the link

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

Or something like Dropbox or Google Drive...

Votes

Translate

Translate

Report

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 ,
Apr 04, 2018 Apr 04, 2018

Copy link to clipboard

Copied

http://www.truna.de/pdf/Schirrmacher Kalkulation.pdf

That's the whole Form.

Votes

Translate

Translate

Report

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 ,
Apr 04, 2018 Apr 04, 2018

Copy link to clipboard

Copied

- Move the code to be a custom validation script, instead of calculation.

- Replace:

this.getField("Artikelnummer.0").value.toString()

With:

event.value

- You have a mistake in the name of the "Artikelbezeichnung.0" field. You're referring it as "Artikelbezeichung.0" in your code (notice the missing "n" in "-nung"). German names are tricky when it comes to field names, nicht wahr? 🙂

Votes

Translate

Translate

Report

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 ,
Apr 04, 2018 Apr 04, 2018

Copy link to clipboard

Copied

LATEST

Danke schön, sehr geholfen, hast was gut!

Votes

Translate

Translate

Report

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 ,
Apr 03, 2018 Apr 03, 2018

Copy link to clipboard

Copied

This line is also incorrect:

A = this.getField("Artikelnummer.0").value.toString;

toString is a function. To use it you must call it, like this:

this.getField("Artikelnummer.0").value.toString();

Or simply use:

this.getField("Artikelnummer.0").valueAsString;

Votes

Translate

Translate

Report

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