SoftadminGuide.FieldStandard_Column

Type: Stored procedure

Creates a standardized control to pick one column.

Expects a table #SoftadminGuideMultiControl created by SoftadminGuide.Field_MultiControl_Definition.

Example

/*
    Creates an input field begging for a table name.
*/
EXEC SoftadminGuide.FieldStandard_Table_Create 
	@FieldName = 'TableField',
	@Label = 'Choose a table';

/*
    Creates a dropdown list, populated with all columns of the selected table.
    The @CustomWhere restricts the choise to columns of type varchar,
    beginning with 'A'.
*/
EXEC SoftadminGuide.FieldStandard_Column_Create
	@FieldName = 'ColumnField',
	@Label = 'Choose column',
	@TableFieldName = 'TableField',
	@CustomWhere = 'TY.name = ''varchar'' AND C.name LIKE ''A%''';

Parameters

@FieldName mandatory varchar(1000)
The field name, used to refer to this field by other fields and when getting the value from the multi-control.
@Label mandatory varchar(1000)
@TableFieldName mandatory varchar(1000)
The field name of a field created using SoftadminGuide.FieldStandard_Table_Create.
@Description optional nvarchar(max)
@CustomWhere optional nvarchar(max)
Custom where statement. May refer to these table aliases:
C = sys.columns
TY = sys.types
@IsMandatory optional bit
Default 1.