Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  

QuickList.AddSQL

Adds values to a quick list via SQL.

Component: List
Version: 5.1
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "QuickList.AddSQL"; ListRef; SQL Statement; FileName { ; Params } )

Parameters

Parameter Description Example value
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
Optional, pass here parameters. One parameter to this function for each parameter you want to pass to the SQL statement.
123

Result

Returns number of items added or error.

Description

Adds values to a quick list via SQL.
All values in the result set are added as text to the list.
Returns error in case of SQL error with error message.

This function is currently only supported for FileMaker 11 and newer. If you need it for older versions, please contact us.

Examples

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 )

See also


QuickList.AddQuickList   -   QuickList.AddValue

Feedback: Report problem or ask question.




Links
MBS Realbasic Plugins - Nachhilfe in Kretz