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

Gestion de grille de prix et quantité via le formulaire intéractif

New Here ,
May 29, 2024 May 29, 2024

Bonjour, 

 

Je n'arrive pas à lier une liste déroulante de quantité et une liste de prix pré-établie, pour que les clients sélectionnent une quantité et ça affiche le bon prix, puis calculer le total sur le document. En gros est-ce qu'on peux lier deux listes.

Je ne sais pas si c'est possible et malheureusement je ne peux vous fournir le doc en question. 

 

Bonne journée !

TOPICS
PDF forms
628
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
1 ACCEPTED SOLUTION
Community Expert ,
May 29, 2024 May 29, 2024

Yes, that makes more sense... You can simply apply the price as the export value of each item in your drop-down and then use this code as the calculation script of the price field:

 

event.value = this.getField("Quantity").value;

 

Make sure to set the option of the drop-down field to commit the selected value immediately (under Properties, Options tab), so that the text field will update as soon as you make a selection in the drop-down.

View solution in original post

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 ,
May 29, 2024 May 29, 2024

Yes, it's possible. As the custom validation script of the first field enter something like this (edit the field-name and values as needed, of course):

 

if (event.value=="Product 1") this.getField("PriceList").setItems(["", "1.22", "2.44", "5"]);
else if (event.value=="Product 2") this.getField("PriceList").setItems(["", "3.22", "12.44", "15"]); // etc.
else this.getField("PriceList").clearItems();
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 ,
May 29, 2024 May 29, 2024

I don't know why it don't take it.  it stays on no validation.

I think i was misleading on linking two lists, now i know that i must define a value(price) to a field via the lists(quantity).

 

But why it stays on no validation field.

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 ,
May 29, 2024 May 29, 2024

Yes, that makes more sense... You can simply apply the price as the export value of each item in your drop-down and then use this code as the calculation script of the price field:

 

event.value = this.getField("Quantity").value;

 

Make sure to set the option of the drop-down field to commit the selected value immediately (under Properties, Options tab), so that the text field will update as soon as you make a selection in the drop-down.

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 ,
May 29, 2024 May 29, 2024
LATEST

All fine, Thank you

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