Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Adds values to a quick list via SQL.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
List | 5.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
ListRef | The reference to the list returned from QuickList.New function. | $List | |
SQL Statement | SQL Statement as a Text string | ||
FileName | The target database name. Can be empty to not limit query to one database. | "" | |
Params | Optional, pass here parameters. One parameter to this function for each parameter you want to pass to the SQL statement. | 123 | Optional |
Returns number of items added or error.
Fill a list and return it:
# create new list
$list = MBS("QuickList.New")
# add values via SQL
MBS("QuickList.AddSQL"; $list; "SELECT TextField FROM \"Test Table\"")
# query list content for displaying
$text = MBS("QuickList.GetList"; $list)
# and free it
MBS("QuickList.Free"; $list )
Add values based on SQL query in current file and one parameter:
MBS("QuickList.AddSQL"; "12002"; "SELECT TextField FROM \"Test Table\" WHERE NumberField>?"; Get(Filename); 1 )
Run query with quoted names and parameters for value:
Set Variable [ $Text ; Value: MBS("QuickList.AddSQL"; $ListNum; "SELECT \"MyField\" from \"MyTable\" Where \"SomeField\" = ?"; Get(FileName); "xyz") ]
Created 12nd March 2015, last changed 17th June 2018
QuickList.AddQuickList - QuickList.AddValue
Feedback: Report problem or ask question.