Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TextMerge()
Message
From
29/03/2019 11:16:27
 
 
To
29/03/2019 11:07:40
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01667676
Message ID:
01667705
Views:
36
In the table you have scanned I can have much more defined than the memo field I want to process


With your sample a scan was needed to populate those variables. If variables are ready, then it is simply:
lcResult = Textmerge( m.lcTemplate )
PS: StrTran was needed just because you cannot set textmerge delimiters to be more than 2 characters in length.


>Hi Cetin,
>
>I would not scan the table, but only the memo field and define str1 ... ... ie only those that are in that memo field
>
>
>
>Clear All
>Clear
>Set Safety Off
>
>
>Create Cursor _tempm (tekst1 M)
>TEXT TO mtekst1 noshow
>
> First line : <<#_str1#>>
> Second line: <<#_str2#>>  and then again <<#_str1#>>  and  <<#_str3#>>  for the end
> Third line: <<#_str3#>>
>
>
>ENDTEXT
>
>
>Insert Into _tempm (tekst1) Values (mtekst1)
>Browse Nomodify Nocaptions
>
>Create Cursor _temp (idtekst c(10), tekst c(50) )
>
>For i=1 To 3
>	Insert Into _temp(idtekst, tekst) Values ("_str"+Transform(i), "This is tekst_"+Transform(i))
>Endfor
>Browse Nomodify Nocaptions
>
>Select * From _tempm Into Cursor _tempFill Where .F. Readwrite
>
>lmTranslated=DoProcessing(_tempm.tekst1, '_temp')
>? "---"
>? m.lmTranslated
>? "---"
>
>Insert Into _tempFill Values (m.lmTranslated)
>
>Select _tempFill
>Browse Nomodify Nocaptions
>
>Procedure DoProcessing(tcTemplate, tcSourceCursor)
>	Select (m.tcSourceCursor)
>	Scan
>		Store Trim(tekst) To ('m.'+Trim(idtekst))
>	EndScan
>	Select 0 && just because you failed to use m. in your template
>	tcTemplate = Strtran(Strtran(m.tcTemplate, '<<#','<<'),'#>>','>>')
>	Return Textmerge(m.tcTemplate)
>Endproc
>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform