Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop leading zeros
Message
De
24/02/2009 12:27:54
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01383641
Message ID:
01383813
Vues:
46
I don't think that works.......

This.value ----> "123"
FieldValue ----> "000043123"

yields an incorrect TRUE.


>Rich,
>
>
>set filter to trim(this.value) $ fieldname
>
>
>>We have a table with a PONUM field. The field is 15 characters and when the PONUM is assigned it is padded with leading zeros.
>>
>>I've got a textbox which is used to set a filter on the cursor with this field. In the InteractiveChange event I need to put the equivalent of
>>
>>SET FILTER TO MyStripLeadingZeros(fieldname) = TRIM(this.value)
>>This would mean that, if you type a "1" all the following records would be included in the filter
>>
>>000000000000001
>>000000000000011
>>000000000000112
>>000000000010012
>>000000001122334
>>
>>If you then added a second "1" ("11") it would reduce the selected list to
>>
>>000000000000011
>>000000000000112
>>000000001122334
>>
>>I'm not happy with my version of MyStripLeadingZeros()
>>
>>Can somebody give me a reasonable efficient implementation of it????
>>
>>Thanks to all...............Rich
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform