Modifies a field created by SoftadminGuide.FieldStandard_SqlObjectName. Adds a warning that appears if the user has entered an object that already exists. The warning can be stopping (the user must confirm overwrite with a checkbox) or not.
Use one or more of the @AllowX parameters to control what kind of objects to allow.
/*
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;