SoftadminGuide.FieldStandard_SqlObjectName

Type: Stored procedure

Creates a standardized control to select an sql table, view, procedure and/or function.

Expects a table #SoftadminGuideMultiControl created by SoftadminGuide.Field_MultiControl_Definition.

Example

/*
	This example is supposed to be part of a guide procedure,
	inside the "If @Action = 'GetFields'" block.
*/
	-- Create a textbox with autosearch, used to enter a procedure name.
	EXEC SoftadminGuide.FieldStandard_SqlObjectName
		@FieldName = 'ProcedureNameField',
		@Label = 'Select a procedure',
		@IsMandatory = 1,
		@AllowStoredProcedures = 1, -- Finds only procedures
		@AllowNonExisting = 1; -- Also accept a name that does not exist.

	-- In case the user entered a non-existing object,
	-- show a warning and demand the user confirm overwrite by checking a box.
	EXEC SoftadminGuide.FieldStandard_ExistingSqlObjectWarning
		@ObjectFieldName = 'ProcedureNameField', -- Same fieldname as above.
		@ConfirmOverwriteCheckBoxFieldName = 'OverwriteConfirmationCheckboxField',
		@AllowStoredProcedures = 1;

Parameters

@FieldName mandatory varchar(1000)
The field name, used to refer to this field by other fields and when getting the value from the multicontrol.
@Label mandatory nvarchar(1000)
@IsMandatory mandatory bit
@Description optional nvarchar(max)
@AllowNonExisting optional bit
Allow the user to enter the name of a non existing sql object. Default 1.
@AllowTables optional bit
Find matching tables. Default 0.
@AllowViews optional bit
Find matching views. Default 0.
@AllowStoredProcedures optional bit
Find matching stored procedures. Default 0.
@AllowScalarFunctions optional bit
Find matching scalar functions. Default 0.
@AllowTableValuedFunctions optional bit
Find matching table valued functions. Default 0.
@AllowInlineTableValuedFunctions optional bit
Find matching inline table-valued functions. Default 0.