Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing contents from memo field
Message
De
12/04/2009 19:23:00
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01394458
Message ID:
01394462
Vues:
75
This message has been marked as the solution to the initial question of the thread.
You have to do some basic string manipulation. The steps are:

1. Search for "Dear customer", using the at() command. This will give you the position where "Dear customer" starts (or zero if not found - you should do some error-checking).

2. Extract everything after that position; substr() seems appropriate here.
local lcSearchText
lcSearchText = "My customer"
replace MyMemoField with substr(MyMemoField, max(at(lcSearchText, MyMemoField), 1))
Not tested exhaustively. The max() ensures that you start, at least, at position 1: Otherwise, if the search text is not found, you would start at position zero; and a quick test reveals that would return an empty string (and therefore eliminate your entire memo field).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform