**
Ok...not to be sarcastic....because I truly enjoy the responses...but here is a question.  Every suggestion given to me has been 'avoid this by moving it to the server'...should we not as Remedy developers have some level of expectation that the clients given to us by the vendor perform a function the same regardless of which client is specified?...I mean I'm not doing anything highly advanced here...in fact it's a simplistic substr.  In this case I can move it to a filter...but I have another section of the application that unfortunately needs to be done in AL...does nobody feel I should bug this to Remedy support?...or is that fruitless?
 
Thank you for your responses...they helped me fix this particular issue and for that I am grateful.


From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Eric Cleereman (IT)
Sent: Friday, April 28, 2006 1:21 PM
To: [email protected]
Subject: Re: Weird Mid-Tier Problem

**
Hi L.J.,
 
I'm running 6.3, patch 14 in one of our dev environments.  Mid-Tier is on a Windows 2000 Server.  ARServer 6.3 and Oracle 9.2 are on an AIX 5.2 server.
 
I'm able to do this using a single active link with a single set fields action in a single pass:
    Read Value from: SQL
    SQL Command:   SELECT SUBSTR ('$FileSpec$',(SELECT INSTR ('$FileSpec$','\',-1) FROM DUAL)+1) FROM DUAL
   
I only have Oracle, so I can't say for sure this would work under another database, but it likely would.  The SQL command is going to be the same, except for INSTR, which I believe is only supported under Oracle and MySQL.  Under DB2 or SQL Server I think it would be LOCATE or CHARINDEX respectively.
 
This works fine under the Windows User Tool, Mid-Tier, and Web Services.
 
Eric Cleereman
-----Original Message-----
From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED]On Behalf Of Heider, Stephen
Sent: Friday, April 28, 2006 2:20 PM
To: [email protected]
Subject: Re: Weird Mid-Tier Problem

**
Another option would be to create a SQL function.  Then, just issue a Set Field SQL command whenever you need to return only the filename.  This function could be used in Active Links and Filters.
 
Stephen


From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Lucero, Michelle - IST contractor
Sent: Friday, April 28, 2006 2:17 PM
To: [email protected]
Subject: Re: Weird Mid-Tier Problem

**
Two silly possibilities
1.  It might be treating the "\" like an escape character?
2.  Or, it could be URL encoding the ":" or "\" and adding extra characters.
 
I think Fred's right.  To workaround whatever possibility it may be, a filter might be better.
 
Michelle


From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of L. J. Head
Sent: Friday, April 28, 2006 12:20 PM
To: [email protected]
Subject: Weird Mid-Tier Problem

**
Mid-Tier 6.3 Patch 14
 
First off...is there a better way, secondly...does anyone know why it's doing this
 
I am attaching a file to a record...and want to store the file name in a field.  Upon the file being attached I do a setfield of the attachment field to a character field.  This gives me for example c:\autoexec.bat.  I don't care about the path to the file...I just want the file name, so I perform this set of setfields as many times as necessary to remove all of the \'s from the file name
 
Setup:
2 Fields:
File Name (Character)
zTmpInt (Int)
 
1 Active link that fires as long as zTmpInt >= 0 (0 is it's default value)
 
<ACTL> Checking AL (5)
<ACTL>     -> Passed qualification -- perform if actions
<ACTL>          0: Set Fields
<ACTL>             File Name (536870916) = :\AUTOEXEC.BAT
<ACTL>          1: Set Fields
<ACTL>             zTmpInt (536870917) = 1
<ACTL>          2: Goto EO
<ACTL>            EO from action -- 5
<ACTL> Checking AL (5)
<ACTL>     -> Passed qualification -- perform if actions
<ACTL>          0: Set Fields
<ACTL>             File Name (536870916) = AUTOEXEC.BAT
<ACTL>          1: Set Fields
<ACTL>             zTmpInt (536870917) = -1
<ACTL>          2: Goto EO
<ACTL>            EO from action -- 5
<ACTL> Checking AL (5)
<ACTL>     -> Failed qualification
 
This works great and very fast on the native client....if I however run this same workflow through Mid-Tier my file name is set to 'UTOEXEC.BAT'...it always truncates the first character of the actual file name....your assistance is apprecated.  I'm looking into upgrading to patch 16...but don't think I should need to...
__20060125_______________________This posting was submitted with HTML in it___ __20060125_______________________This posting was submitted with HTML in it___ __20060125_______________________This posting was submitted with HTML in it___
__20060125_______________________This posting was submitted with HTML in it___ __20060125_______________________This posting was submitted with HTML in it___

Reply via email to