We are trying to make a message work with some parameters but after we trigger the message the only thing we see is the translation message and not the values in the query
the only thing we see is this when we trigger the message:
What we have in our query is
/* Drop stored procedure def_purchase_order first. */
if exists (select 1 from sysobjects
where name = 'def_purchase_order' and type = 'P')
drop procedure def_purchase_order
go
create procedure def_purchase_order
(
@default_mode tinyint, -- 0 = add, 1 = update
@import_mode tinyint, -- 0 = regular, 1 = import row, 3 = import
@cursor_from_col_id varchar(255), -- column that triggered the default
@cursor_to_col_id varchar(255) output, -- cursor in column after leaving the default
@purchase_order_id purchase_order_id output,
@id id output
)
as
begin
-- Do not count affected rows for performance
SET NOCOUNT ON;
--control_proc_id: def_scan_purchase_order
--template_id: def_scan_purchase_order
--prog_object_item_id: def_scan_purchase_order
--template_description:
declare @warehouse_id as nvarchar(50)
declare @warehouse_name as nvarchar(100)
declare @msg_parameter as nvarchar(500)
if @purchase_order_id <> ''
begin
if (select purchid from [xxx].[xxx].[dbo].[purchtable] where purchid = @purchase_order_id) is not null
begin
set @warehouse_id = (select inventlocationid from [xxx].[xxx].[dbo].[purchtable] where purchid = @purchase_order_id)
set @warehouse_name = (select name from [xxx].[xxx].[dbo].[inventlocation] where [inventlocationid] = @warehouse_id)
set @msg_parameter = (select CONCAT('<text>', 'Inkooporder', @purchase_order_id, 'is bedoeld voor' , @warehouse_id, ' - ', @warehouse_name, '</text>'))
exec tsf_send_message 'purchase_order_info', @msg_parameter, 0
end
if (select purchid from [xxx].[xxx].[dbo].[purchtable] where purchid = @purchase_order_id) is null
begin
set @msg_parameter = (select concat('<text>', 'Inkooporder' , @purchase_order_id, 'is niet gevonden!','</text>'))
exec tsf_send_message 'purchase_order_not_found', @msg_parameter, 0
end
end
end
go
grant execute on def_purchase_order to public
go
I am probably missing something but I just do not see what I am missing
I hope the information is clear enough if not please let me know so I can elaborate