abracadabraPDF › Forums › PDF – Général › Scripts pour faire une liste avec valeur d’Exportation › Répondre à : Scripts pour faire une liste avec valeur d’Exportation

Pour éviter la disparition du zéro à gauche il faut remplacer “value” par “valueAsString”, ce qui revient à utiliser la chaine de caractère brute plutôt qu’une valeur interprétée.
this.getField(“champ”).value; ==> this.getField(“champ”).valueAsString;
:Smiley01:
Extrait de la documentation :
valueAsString
Returns the value of a field as a JavaScript string.
It differs from value, which attempts to convert the contents of a field contents to an accepted format.
For example, for a field with a value of “020”, value returns the integer “20”, while valueAsString returns the string “020”.