Retrieves the text contents of the control fieldName.
Parameters:
Name |
Type |
Description |
fieldname |
String |
ScreenFieldName of the control. Ctrl+Click onto a control to retrieve its fieldName (= ScreenFieldName) |
Returns:
Type |
Value |
Description |
||||||||||||||||||||
String |
contents |
Retrieves the text contents of the control fieldName
contents can be retrieved for the following controls:
|
Available in:
WindowMain |
WindowLink |
YES |
YES |
Used in:
XojoScript Name |
GUID |
Add code and prices to events |
A5CABD2D-92A3-494C-ADDF-8666611B3B6B |
Calculate participation fee for seminar attendee |
032B50D3-D463-453E-9370-9AF7C34DA1D5 |
Create Linkbox text for an address |
63EAC259-4192-483E-9CB4-53AE6B5E5C24 |
Create Seminar Invoice in Word |
D2036EFA-D283-481A-9A93-D00547680749 |
Create letter in Word, from address |
90AC7CD7-EE78-4659-8076-076E96B9EF5B |
Generate Printlabel and linkbox text |
74855E25-5542-4B9D-B821-04C414425526 |
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:
// Get Index of selected record in listbox
Dim idx As Integer = ListIndex("imLB_evt_List3")
// Skip if idx is -1, then there is no selection
If idx >= 0 Then
// Retrieve listbox text and store its records into an array
Dim arrLBRecs(-1) As String = Split(GetText("imLB_evt_List3"),EndOfRecord)
// Retrieve selected record
Dim rec As String = arrLBRecs(idx)
// store fields of selected record into an array
Dim arrRecFlds(-1) As String = Split(rec,EndOfField)
// Write each field out to textfields on screen
SetText("imTF_evt_PriceCode",arrRecFlds(0))
SetText("imTF_evt_Price",arrRecFlds(1))
SetText("imTF_evt_PriceEuro",arrRecFlds(2))
SetText("imTF_evt_TextD",arrRecFlds(3))
SetText("imTF_evt_TextE",arrRecFlds(4))
SetText("imTF_evt_TextF",arrRecFlds(5))
End If // idx >= 0