Copy link to clipboard
Copied
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 !
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.
Copy link to clipboard
Copied
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();
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
All fine, Thank you