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

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:

NameDescription
[Required]
Name
The user friendly name for this parameter
DescriptionA user friendly description for this parameter that is shown as a tooltip to the user
SQLTypeThe 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.
IsNullableIndicates if the field can be left blank with no input from the user
Max LengthIf 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.
PrecisionIf this field is a decimal this holds the precision value. i.e decimal(16,8)
ScaleIf this field is a decimal this holds the scale value. i.e. decimale(16,8)
VisibleIndicates 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.
EntityTypeIf 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 NameThe property this field maps to within the selected EntityType.
FormatApplies 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.
RequiredIndicates if the user must enter a value for this parameter
Default ValueProvides a hardcoded default value for this parameter
Formula ValueProvides a formula that can be run at execution time to determine a default value for this parameter

Note: The standard default parameters should always remain at the top in the system order of Account, Canvas, Team, As Of Date.


Commands

A SQL Wrapper Parameter has the standard set of commands and functions when being viewed from a grid. See our standard grid functionality.