Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

ListDialog.AddSQL

Adds items via SQL statement.

Component Version macOS Windows Linux Server iOS SDK
ListDialog 5.1 ✅ Yes ✅ Yes ❌ No ❌ No ✅ Yes
MBS( "ListDialog.AddSQL"; SQL Statement; FileName { ; Params... } )   More

Parameters

Parameter Description Example Flags
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

Result

Returns number of items added or error.

Description

Adds items via SQL statement.
First field from SQL result is used as text, second as tag and third as header flag.
Tag and header columns are optional.

This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.
Please repeat Params parameter as often as you need.

Examples

Add items:

MBS("ListDialog.AddSQL"; "select Text, Tag, Header from Liste")

Add value list entries for texts and tags:

Set Variable [ $result; Value: MBS("ListDialog.AddSQL"; "SELECT DISTINCT ValueList2, ValueList1 FROM Kontakte WHERE Length(ValueList2) > 0 ORDER BY ValueList2 ASC")]

Release notes

  • Version 15.2
    • Fixed an issue with ListDialog.AddSQL function where filename parameter was ignored if no other parameters followed.

Blog Entries

This function checks for a license.

Created 21st March 2015, last changed 13th June 2025


ListDialog.AddItemsToList - ListDialog.ClearColumnHeaders