Иногда возникает необходимость передать значение фильтров таблицы в процедуру создания сущности fastCreate.
Для этого необходимо добавить в нее параметр filters подобным образом:
CREATE PROCEDURE [dbo].[crud_relmap_fastCreate]
@filters CRUDFilterParameter READONLY,
@text nvarchar(256),
@username nvarchar(32)
AS
BEGIN
-- извлечение параметров фильтра
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'
-- добавление элемента в таблицу
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 'Элемент создан' Msg, 1 Result
END