Hello Everybody,
I'm trying to use lookup on simple form:
screen shoot forms
Where storage is preset drop-down list with three values and position - one of the table columns and procedure is a result field.
However it never returns proper result in the procedure field - it stays 1 (default)
If procedure modified to work with one parameter only - position, it works properly.
Is there something I'm missing?
Thank you,
Vladimir
Lookup rules
screen shoot lookup
SQL
USE [LaserFiche]
GO
/****** Object: StoredProcedure [dbo].[select_position_id] Script Date: 09/01/2014 17:43:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[select_position_id] @positionID nchar(35), @storageID nchar(50)
as
declare @str_val int
IF @positionID != ''
begin
SELECT count(PositionID) as str_val
FROM [Laserfiche].[dbo].[A_Physical_Record_requests]
where PositionID = @positionID and storageID = @storageID
end
ELSE
select 1 as str_val;
GO