Dear Vinson,
                  We were facing a simlar problem and we wrote a SQL
function to strip off the leading path.

Here's that function code:

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

CREATE FUNCTION fnFindFileName (@InputString as varchar(255))
RETURNS varchar(128)
AS
BEGIN
DECLARE @EvalString varchar(255),
   @EvalCharacter char(1),
   @OutputString varchar(128),
   @counter int
SET @counter = len(@InputString)
SET @EvalString = @InputString
SET @EvalCharacter = RIGHT(@EvalString,1)
SET @OutputString = ''
WHILE @counter>0 AND @EvalCharacter<>'\'
BEGIN
   SET @OutputString = @EvalCharacter + @OutputString
   SET @EvalString = LEFT(@EvalString,LEN(@EvalString)-1)
   SET @EvalCharacter = RIGHT(@EvalString,1)
END
RETURN @OutputString
END

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

We wrote that function result to a temp field, then We used the following
RUN PROCESS command:  PERFORM-ACTION-SAVE-ATTACHMENT to save the attachment.

Hope this helps.

Regards,

Roney Samuel Varghese


On 4/6/07, Vinson <[EMAIL PROTECTED]> wrote:

Hi,

My system is remedy v7.01. I'm using a display-only form to push an
attachment to backend data form. I build a filter for this backend
form for 'subit' and 'modify' to notify my user that file is updated.

But I found the filename is like '12345;78901;filename' when I set the
attachment to a character field. But with Windows user client, it will
be different and like  '12345;78901;pathname\filename'.

Did you also have the same problem and how to address it?


_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where
the Answers Are"


_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers 
Are"

Reply via email to