Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TextMerge()
Message
From
29/03/2019 10:38:30
 
 
To
29/03/2019 09:41:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01667676
Message ID:
01667699
Views:
42
Hi Cetin,

Thanks. This is fine.

Something like this I wanted.
Maybe it could be UDF (User Def. Funct.) inside TextMerge().
The parameter might be
<< ... >>
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
Reply
Map
View

Click here to load this message in the networking platform