Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to format multi-line records correctly
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to format multi-line records correctly
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01315993
Message ID:
01315993
Views:
56
Hi everybody,

Could you please help me to quickly format these?
scan
*  lcPhones = m.lcPhones + iif(empty(m.lcPhones), '', chr(13)) + ;
 *   trim(Phone) 
   do case
        case empty(Type) or alltrim(Type) = 'Home'
             lcHome = m.lcHome + iif(empty(m.lcHome),"", chr(13)) + trim(Phone)
        case 'E-mail' $ type
             lcEmail = m.lcEmail + iif(empty(m.lcEmail),"", chr(13)) + trim(Phone) + " " + strtran(Type,'E-mail','')
         case alltrim(Type) = 'Office'
             lcOffice = m.lcOffice +  iif(empty(m.lcOffice),"", chr(13)) + trim(Phone)
		case alltrim(Type) = 'Cellular'
             lcCellular = m.lcCellular +  iif(empty(m.lcCellular),"", chr(13)) + trim(Phone)
        otherwise
             lcOther = m.lcOther +  iif(empty(m.lcOther),"", chr(13)) + trim(Phone) + " " + Type
             
    endcase       
endscan
lcPhones = ?
My problem is to concatenate these fields now in one line. I can not simply use + because I may have chr(13) in one (or many) of the fields.

Would you please help me to code this?

Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform