a5_sqlToJSONExpandingMenu as c (connectionString as c, table as c, fieldList as c [, endpointFieldName as C [, filter as C [, order as C [, argsIn as SQL::Arguments [, endpointFunctionName as C]]]]])
Connection string to the SQL database.
The table in the SQL database.
The comma-delimited list of fields from the table that defined the Expanding menu hierarchy. For example, if you specify country,city,contactname the Expanding Menu will show a list of countries. If you expand a country, you will see a list of cities in the selected country. If you expand a city you will see a list of contactnames in the selected city. If you click on a city, the endpointFunctionName will be called and the value of the endpointFieldName will be passed to the function.
The name of the field whose value is passed to the endpointFunction.
The filter to use for the SQL Select statement's WHERE clause. (The SQL Select statement is automatically generated from the function arguments.)
The order to use for the SQL Select statement's ORDER BY clause.
Default = null_value(). A SQL::Arguments object that defines the arguments used in the filter. argsIn must be defined if the filter uses arguments.
Generates JSON to populate an Expanding Menu control from a SQL query.
The a5_sqlToJSONExpandingMenu() function generates the JSON needed to populate an Expanding Menu control in a UX component from data returned by a SQL query.
Dynamically Populating an Expanding Menu with Ajax Callbacks
This video shows how you can dynamically populate an Expanding Menu control with data computed in an Ajax callback.