Joined: 02 Apr 2013
Location: United States
Online Status: Offline
Posts: 2
Topic: Parse data in comment field Posted: 02 Apr 2013 at 10:16am
New to writing code, but not to Crystal Functions.
I need to parse data in a comments field to pull anything after a specified word; i.e Name, address, city, state; Parcel xxxxxxxx. It will be in the same format, the word "parcel" after a semi colon, but the end length will vary. I need to parse everything after the word "parcel". Any suggestions?
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Posted: 03 Apr 2013 at 8:00am
You could do something like this:
StringVar parcel := '';
NumberVar atParcel;
at := InStr({table.comments}, '; Parcel');
if at > 0 then
parcel := lTrim(Mid({table.comments}, at + 7, length({table.comments}));
parcel
This will give you everything after the word "Parcel" if it is preceded by "; ". So, it should filter out any situations where the word Parcel is included in the address etc.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum