<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [EmData] Grouping fields inside fields on a phonebook</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><TT><FONT SIZE=2>Without some sample data I can't be sure, but have you tried this:<BR>
<BR>
«if CATEGORY &lt;&gt; prev CATEGORY»«CATEGORY»<BR>
«endif»«if CITY &lt;&gt; prev CITY»«CITY» («CODE»)<BR>
«endif»«COMPANY»(tab)«TEL»<BR>
«ADDRESS»<BR>
<BR>
<BR>
Of course your data will need to be sorted by first Category, second City, before you import.<BR>
<BR>
Your first statement only looked at 'Category' if the 'City' was new. So if the records went from a Baker in San Francisco to a Grocer in San Francisco, the change of category would be missed.<BR>
<BR>
The second statement would repeat the Category heading every time, as far as I can see.<BR>
<BR>
Sometimes it helps to draw a diagram, or write it down - I'm a word person rather than pictures, but probably most people would prefer a sort of flow diagram: 'If it's a new category we want to put that in, then if it's a new city we want to put that in, then we want company name and phone etc'.<BR>
<BR>
Hope that helps...</FONT></TT>
</P>


<BR>
- -<BR>
Fourninety Limited, a member company of the Media Square plc group. Registered in England No. 3737606. Registered address Clarence Mill, Clarence Road, Bollington, Cheshire. SK10 5JZ<BR>
<BR>
Confidentiality Notice: The information in this document and any attachments are confidential. It is intended only for the use of the named recipient. If you are not the intended recipient please notify us  immediately and delete this document. The contents on this document must not be disclosed to any other person nor may any copies be taken. The views of the author may not represent the views of the Company.<BR>
<BR>
Security Warning: This e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium. All liability for any claims arising as a result of using this medium to transmit information by us or to us is excluded to the extent permitted  by law.<BR>
</BODY>
</HTML>