Sub Activity_Create(FirstTime As Boolean)
Dim c1 = "select * from logs where log_id>=[[w_log_id]] and log_app = '[[w_log_app]]' order by [[ordlog]]" As String
Dim w_log_id As Int
Dim w_log_app, ordlog As String
w_log_id=10 ' value returned by calculations and processing
w_log_app="app p28" ' value returned from editText.Text and/or value returned by calculations and processing
ordlog="log_id"
Dim m1 As Map
m1.Initialize
m1.Put("w_log_id", w_log_id)
m1.Put("w_log_app", w_log_app)
Dim ret As String
ret=CreateW(c1, m1)
Log("ret="&ret)
' RETURN : ret=select * from logs where log_id>=10 and log_app = 'app p28' order by log_id
End Sub
Sub CreateW(pC1 As String, pMap As Map) As String
Dim stmp As String
For Each t1 As String In pMap.Keys
stmp = pMap.Get(t1)
'Log("key="&t1&"-stmp="&stmp)
pC1=pC1.Replace("[["&t1&"]]", stmp)
Next
Return pC1
End Sub