Table. Creating an entity based on filter values

Sometimes you need to pass the value of table filters to the fastcreate entity creation procedure.

To do this, you need to add the filters parameter to it in the same way: 

CREATE PROCEDURE [dbo].[crud_relmap_fastCreate]
	@filters CRUDFilterParameter READONLY,
	@text nvarchar(256),
	@username nvarchar(32)
AS
BEGIN

	-- extracting filter parameters
	declare @filterCatID int
	declare @filterCollectionID int
	select @filterCatID = try_cast(Value as int) from @filters where [Key] = 'catID'
	select @filterCollectionID = try_cast(Value as int) from @filters where [Key] = 'collectionID'


	-- adding an item to a table
	insert into kw_pages(title, catID, collectionID)
	select value, nullif(@filterCatID, 0), nullif(@filterCollectionID, 0)  from split(@text,char(10))
    where len(value)>1


	select 'Item is created' Msg, 1 Result

END
Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started
{sp-shortDemostandLinks}

Falcon Space Platform

This is a reduction in the cost of ownership

at the expense of fewer people to support

This is a quick change

while using the program

This is a modern interface

full adaptation for mobile devices

Note