Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with the calculated field
Message
General information
Forum:
Visual FoxPro
Category:
Stonefield
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01339180
Message ID:
01341114
Views:
27
>Hi Naomi,
>
>I was half expecting to see how you are retrieving 'EMail' field.
>
>You said 'calculated' field, it is not the case of the length of the first item controlling the size of the field is it?
>
>Mathias

I don't know how the Stonefield Query works internally, but the field is defined as a Memo and the algorithm of calculation I included in my message.

>
>>Hi everybody,
>>
>>We have calculated fields in our People table called EMail, CellPhone, HomePhone, OfficePhone. I set all these fields to be Memo. Now, for some unknown reason the e-mail field only displayes 4 first characters.
>>
>>Here is the script that creates this field
>>
>>lparameters tcCustomerID
>>
>>local lnSelect, lcSelect, lcPhones, loDatabase
>>lnSelect = select()
>>if not used('curEmails')
>>lcSelect = "select cID, Phone, Type from Phones " + ;
>>  "where Type LIKE 'E-mail%' and Phone <> space(60)"
>>loDatabase = SQApplication.DataEngine.Databases.GetMainDatabase()
>>loDatabase.ExecuteSQLStatement(m.lcSelect, , 'curEmails')
>>select curEmails
>>index on cID tag cID
>>endif
>>
>>lcPhones = ''
>>select curEmails
>>set order to cID
>>if seek(m.tcCustomerID)
>>scan while cID = m.tcCustomerID
>>  lcPhones = m.lcPhones + iif(empty(m.lcPhones), '', chr(13) + chr(10)) + trim(Phone) + ' ' + strtran(trim(Type),"E-mail","")
>>endscan
>>endif
>>select (m.lnSelect)
>>return m.lcPhones
>>
>>
>>Do you know what could be wrong?
>>
>>Also, we tried to apply specific width and cut off, show ellipsis at the end setting, but no dots were shown even with data cut off.
>>
>>Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform