SQL Wrapper Parameters
The Parameters view allows you to specify precisely the parameters your stored procedure or function take as inputs for running your sql. You can specify LemonEdge fields against them so the system knows automatically how to present selection options to the user for entering parameter values.
SQL Wrapper Parameter Features
The parameters displayed here are the actual parameters to your function or stored procedure, so the system knows how to call your sql and also how to present the relevant parameter options to the user.
All SQL Wrappers must have the same initial 4 parameters for every stored procedure or function, these are:
- AccountID
- CanvasID
- TeamID
- LastUpdated
Warning
You must provide these, in this order, as the initial 4 parameters of any SQL Wrapper. The system will automatically generate them whenever you create a new SQL Wrapper anyway. See here for more info.
SQL Wrapper Parameter Properties
All SQL Wrapper Parameters have the following properties:
Name | Description |
---|---|
[Required] Name |
The user friendly name for this parameter |
Description | A user friendly description for this parameter that is shown as a tooltip to the user |
SQLType | The underlying sql type for this parameter in the function or procedure This should match the underlying sql type of the field itself if you are mapping it to one. i.e. if this holds an ID to a record then it should be of type uniqueidentifier. |
IsNullable | Indicates if the field can be left blank with no input from the user |
Max Length | If the field is a type of text field (nvarchar, etc) this indicates the max length for that field. Leaving this blank would be the equivalent of varchar(max) - presumably unnecessary for a text input parameter though. |
Precision | If this field is a decimal this holds the precision value. i.e decimal(16,8) |
Scale | If this field is a decimal this holds the scale value. i.e. decimale(16,8) |
Visible | Indicates if this parameter should be visible to the user. By default some system parameters are not visible, such as those for permissions. This gives you the ability to make a field invisible and auto populate the value through formulas. |
EntityType | If this field maps to a field in the system you can specify the entity type of that field here. Doing so will mean the system will understand automatically how to display a control for this parameter. For instance if you select Tasks as Entity Type and ID as Entity Property Name, the system will provide a popup of all available tasks for this parameter. |
Entity Property Name | The property this field maps to within the selected EntityType. |
Format | Applies any formatting to the display of this control. [see here for more info] |
[Required] [Key] Param Name |
The unique parameter name. Must begin with an '@' symbol. |
Required | Indicates if the user must enter a value for this parameter |
Default Value | Provides a hardcoded default value for this parameter |
Formula Value | Provides a formula that can be run at execution time to determine a default value for this parameter |
Warning
Note: The standard default parameters should always remain at the top in the system order of Account, Canvas, Team, As Of Date.
Commands
Note
A SQL Wrapper Parameter has the standard set of commands and functions when being viewed from a grid. See our standard grid functionality.