Retrieves the text contents of the control fieldname from the record with id.
Parameters:
Name |
Type |
Description |
fieldname |
String |
ScreenFieldName of the control. Ctrl+Click onto a control to retrieve its fieldName (= ScreenFieldName) |
id |
Integer |
id of a record in one of the database tables.
If one passes in a record id, then the system will try to find the table where the fieldname belongs to. Then it will search the record with id in it and if found, then return the contents of its database field accordingly. |
Returns:
Type |
Value |
Description |
||||||||||||||||||||
String |
contents |
Retrieves the text contents of the database field belonging to control fieldname. The database field is assigned to the control in the Layout Editor.
contents can be retrieved for the following controls:
|
Available in:
WindowMain |
WindowLink |
YES |
YES |
Used in:
XojoScript Name |
GUID |
Calculate participation fee for seminar attendee |
032B50D3-D463-453E-9370-9AF7C34DA1D5 |
Calculate seminar participation fee |
2F6CFC74-44AB-4956-A760-BBD5E57595E8 |
Calculate total participation fee for current attendee |
F0F802CC-D151-4F59-A749-1E232527D0C2 |
Create Seminar Invoice in Word |
D2036EFA-D283-481A-9A93-D00547680749 |
Edit Registration |
89F9973D-C3A4-4466-BAE7-8AE85115AE09 |
Load seminar prices to registration |
1E3DB33D-DC46-46BB-8483-C15DBDF3A423 |
Hint: You can find more references to XojoScripts which make use of this function by sending the following SQL statement to the database:
Select id,GUID, ScriptName,ScriptCode from im_scripts where ScriptCode Like '%GetText%'
Example XojoScript:
Dim id As Integer = 1436
// Retrieve the language code of selected address
Dim lang As String
lang = Trim(Uppercase(GetText("imCO_adr_Language", id)))
// If language is not set on address, try to determine country
If Len(lang) = 0 Then
lang = Uppercase(GetText("imCO_adr_Country", id))
If Len(lang) > 1 Then lang = Left(lang,1)
End If
MsgBox lang