SoftadminGuide.FieldInfo_Create

Type: Stored procedure

Creates Softadmin® field info.
Expects a temp table created using SoftadminGuide.FieldInfo_Definition. Check with SoftadminGuide.FieldInfo to make sure the field info does not exists already.

Example

IF NOT EXISTS (
	SELECT
		*
	FROM
		SoftadminGuide.FieldInfo FI
	WHERE
		FI.TableName = 'dbo.Model' AND
		FI.FieldName = 'ModelName'
)
BEGIN
	SELECT * INTO #FieldInfo FROM SoftadminGuide.FieldInfo_Definition();

	INSERT INTO #FieldInfo
	(
		FieldInfoGuid,
		TableName,
		FieldName,
		FieldLabel,
		ControlType,
		IsMandatory
	)
	SELECT
		NEWID(),
		'dbo.Model',
		'ModelName',
		'Model name',
		'Textbox',
		1;

	EXEC SoftadminGuide.FieldInfo_Create
		@UserId = @UserId;
END;

Parameters

@UserId mandatory int
The user running the guide.

Resultsets

Resultset: #FieldInfo

A temporary table used as input to the procedure. Containing the field infos to create.
Table count: repeated exactly once
Row count: one or more rows
Columns
FieldInfoGuid mandatory uniqueidentifier

Identifies the field info.

TableName mandatory string

Table name of field info.

FieldName mandatory string

Field name of the field info.

FieldLabel mandatory string

Label of the field info.

ControlType mandatory string

Control type of the field info. Sometimes called "Field type".

Possible value Description
Boolean Dropdown
Checkbox
Colorpicker
Consent Checkbox
Date
Date Range
Datetime
Dropdown
File
File Upload Area
Heading
Heading (Collapsible)
Heading with Checkbox
Hidden
HTML Editor
Info Text
Password
Radio Button Column
Separator
Signature
Textarea
Textbox
Textbox with Autosearch
Time
Uneditable Text
IsMandatory optional bit

"Mandatory" setting of the field info. Optional or not depending on control type.

ControlWidth optional string

"Control width" setting for the field info.

Possible value Description
Long
Longest
Medium-long
Medium-short
Short
Shortest
ControlProcedureName optional string

Stored procedure used by the field info. Usage depends on the control type.

AllowHtml optional bit

"Allow HTML" display setting of the field info.