Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text ... Endtext
Message
De
31/10/2020 04:24:06
 
 
À
31/10/2020 03:09:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01676877
Message ID:
01676878
Vues:
46
First of all, no need to trim hardcoded text. Actually, my rule of thumb is "don't use Alltrim unless absolutely necessary". You will be surprised how many times people overuse it. In my code I rarely use it.

Also you should re-read Help on the subject Text-Endtext. Used properly, you don't need all the convert-to-text functions.

And last, Transform(x) is equal to Alltrim(Str(x)).

Check this code fragment, hopefully you will understand how it works, and learn from it. It does NOT give you a fixed solution to your problem, since I think it's better to teach you than to do the work for you.
cust_name = 'Tariq'
mynaap=9123
prod_type = "Kitchen stove"
jobb_id = 12345
book_date = Date()-5
duee_date = Date()+2
Text to ccMessage TEXTMERGE NOSHOW PRETEXT 1
   Dear customer <<Alltrim(m.cust_name)>> (<<Transform(m.mynaap)>>), 
   your <<ALLTRIM(m.prod_type)>> has been booked with ID # <<Transform(m.jobb_id)>>
   On <<m.book_date>> and delivery date is <<m.duee_date>>
   Thanks for Trusting.
   Heaven Tailors Bahawalpur.
   Mobile: 0301-0000000
EndText
messagebox( m.ccMessage )

>Dear Experts,
>I have a variable called cMessage and it has this data
>
>
>cMessage=""
>cMessage=Alltrim('Dear customer'+Space(1)+Alltrim(m.cust_name)+Space(1)+Alltrim("(")+Alltrim(Str(m.mynaap))+Alltrim(")");
>				+Alltrim(",")+Space(1)+'your'+Space(1)+;
>				ALLTRIM(m.prod_type)+Space(1)+Alltrim('has been booked with ID #')+Space(1)+Alltrim(Str(m.jobb_id));
>				+Space(1)+Alltrim('on')+Space(1)+ Dtoc(m.book_date)+Space(1);
>				+Alltrim('and delivery date is'+Space(1)+Dtoc(m.duee_date))+Chr(13);
>				+Alltrim('Thanks for Trusting.')+Chr(13)+Alltrim('Heaven Tailors Bahawalpur.');
>				+Chr(13)+Alltrim('Mobile: 0301-0000000'))
>

>
>IF I show the result of cMessage in messagebox THEN result looks like this
>
>Dear customer M.sajid Qazi (2450), your Waist Coat has been booked with ID # 8 on 31-10-20 and delivery date is 03-11-20
>Thanks for Trusting.
>Heaven Tailors Bahawalpur.
>Mobile: 0301-0000000
>
>
>Now I want to prepare cMessage for sms
>todo this I am trying cMessage with text....endtext like this
>
>
>Local ccMessage As String
>m.cMessage
>ENDTEXT
>
>Messagebox(ccMessage)
>
>
>but it shows this line only
> m.cMessage
>
>Please
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform