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

JavaScript dans Acrobat

New Here ,
Dec 16, 2022 Dec 16, 2022

Copy link to clipboard

Copied

Bonjour

je n'y connais rien du tout en JavaScript, mais je dois mettre sur un formulaire en Cellule 3, la formule ci-dessous et je n'y arrive pas, merci de votre aide

SI Text1= 1; min (175;Text1*Text2); SI text1>1;min(350.text1*Text2)

 

En plus clair, si T1=1, le résultat de T1*T2 doit être max à 175, et si T1>1, le résultat de T1*t2 doit être à 350 maxi

 

TOPICS
JavaScript , PDF forms

Views

805

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 , Dec 16, 2022 Dec 16, 2022

bonjour,

Pour info, ne pas confondre Java et Javascript : https://www.abracadabrapdf.net/forums/topic/ne-pas-confondre-acrobat-reader-et-acrobat-pro-java-et-javascript/

Sinon, tu peux écrire ce script de calcul de ton champ où tu veux le résultat :

if (this.getField("T1").value==1) {
	if (this.getField("T1").value*this.getField("T2").value>175) event.value=175;
	else event.value=this.getField("T1").value*this.getField("T2").value;
} else if (this.getField("T1").value>1) {
	if (this.getFiel
...

Votes

Translate

Translate
Community Expert ,
Dec 16, 2022 Dec 16, 2022

Copy link to clipboard

Copied

bonjour,

Pour info, ne pas confondre Java et Javascript : https://www.abracadabrapdf.net/forums/topic/ne-pas-confondre-acrobat-reader-et-acrobat-pro-java-et-j...

Sinon, tu peux écrire ce script de calcul de ton champ où tu veux le résultat :

if (this.getField("T1").value==1) {
	if (this.getField("T1").value*this.getField("T2").value>175) event.value=175;
	else event.value=this.getField("T1").value*this.getField("T2").value;
} else if (this.getField("T1").value>1) {
	if (this.getField("T1").value*this.getField("T2").value>350) event.value=30;
	else event.value=this.getField("T1").value*this.getField("T2").value;
} else event.value=this.getField("T1").value*this.getField("T2").value;

Voir exemple ci-joint.

@+

 

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 ,
Dec 17, 2022 Dec 17, 2022

Copy link to clipboard

Copied

LATEST
bonjour

merci beaucoup de votre aide, cela fonctionne nickel , merci à vous
bonne journée

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