Tuesday, January 06, 2009
Search
Home
Foxfire! 8+
Forums
FAQ
Blog
Partnering Opportunities
Demos
Contact Us
http://www.foxfirereporting.com
Register
Login
Forums
Forums
Search
Forum Home
Discussions
General
parsing a field...
parsing a field
6/9/2008 10:21:21 AM
patricks
16 posts
parsing a field
Using foxfire 8.
If I have a field that contains names in the following format: Lastname, Firstname I. (for example, Smith, John Q.) is there any way inside of Foxfire to parse that out into individual fields? so I can print the first name and last name individually?
Thanks for any help :)
6/11/2008 9:06:32 AM
AndrewM
102 posts
www.aksel.com
Re: parsing a field
Patrick,
Sure you can do this. Are the fields ALWAYS parsed that way? If there is any change in the way they are set up, then it might cause some problems however, here's some starting points to get you on your way.
I'm assuming that your names are broken down as follows "Last, First Middle Initial" and let's say the field name is CNAME.
if so, the expression to get the last name would be:
LEFT(CNAME,ATC(",",cname)-1)
First name and Middle Initial
SUBSTR(cname,ATC(",",cname)+2)
The challenge however is - does every entry always have a middle initial or is it only filled in some of the time?
6/24/2008 3:00:44 PM
patricks
16 posts
Re: parsing a field
AndrewM wrote
Patrick,
Sure you can do this. Are the fields ALWAYS parsed that way? If there is any change in the way they are set up, then it might cause some problems however, here's some starting points to get you on your way.
I'm assuming that your names are broken down as follows "Last, First Middle Initial" and let's say the field name is CNAME.
if so, the expression to get the last name would be:
LEFT(CNAME,ATC(",",cname)-1)
First name and Middle Initial
SUBSTR(cname,ATC(",",cname)+2)
The challenge however is - does every entry always have a middle initial or is it only filled in some of the time?
Thank you for the reply. No, not all entries have a middle initial, and sadly sometimes the CS agents slip in a nickname surrounded with quotes. but being able to pull the last name and the first name with middle initial can go a long way towards what we need done.
Just being able to have First Middle, and then Last will let us do manual cleanup if we have to on the report I am trying to make, whereas having them combined as a single "last name, first name" entity makes us have to touch every line.
Can that construct be used to break it on a space? say to peel off the first name that way?
6/25/2008 8:55:55 AM
patricks
16 posts
Re: parsing a field
I have set up the firstname data item as follows:
Data item: ML Firstname
Description: First Name
Expression: SUBSTR(ML.SA_NAME,ATC(",",ML.SA_NAME)+2)
Data type: Character
Result Field Name: MLFIRSTNAME
Column Header: First Name
Output Picture: XXXX
Sample Data: XXXX
Output Width: 32
Table: ML
Alias: ML
Group: Ml
It wouldnt let me put more than 4 X's in the picture or sample data field when I created it, nor when I went back and edited the item, and when I run the report it truncates the display to 4 characters. Is there a step I missed?
6/26/2008 4:38:41 AM
AndrewM
102 posts
www.aksel.com
Re: parsing a field
You can leave the Picture field empty (as that will affect your basic item)
That is what is affecting your output display.
Page 1 of 1
Discussions
General
parsing a field...
Flat View
Tree View
Oldest To Newest
Newest To Oldest
Search
Forum Home
Links
Buy Foxfire!
Downloads
About Foxfire! 8+
Web Reporting
License Activation
Partnering
VFP 9 Runtime
Support / Q & A Forums
About Micromega Systems
Development Blog
Contact Us
Terms Of Use
Privacy Statement
Copyright 2007 by Micromega Systems
Downloaded from DNNSkins.com