David, I wouldn't recommend using James' SQL suggestion due to the unnecessary complexity. I didn't look at the attached def file that was sent earlier, but from past experience if you Use a Filter to perform a Set Fields action to a Character Field, mapping the Attachment field to this character field, you'll end up with a string like:
19456;3571;C:\Documents and Settings\williamc\Desktop\My File.xls The first part of the string before the first semi colon is the size of the file in bytes. You should be able to parse this string easily to extract everything to the left of the first semi colon. NB: This won't work with an Active Link....an AL only returns the file path and name in a Set Fields Action. HTH Chris. > David: > > This is possible as long as you know the Table name (that is where the > attachments are stored in the database.) The attachment field information > is stored in a Large Object datatype in Oracle. Since I work with this > datatype (but what I'm going to describe will work with MS SQL) I will base > my logic on this. > > First you have to find the schemaid for the table in question. > > Select schemaid from arschema where name ='<form name>' (this could be > double quotes for MS SQL) I will assume that the table id is 95 for this > example > > Next you have to find the attachment field ID. This can be done through the > administrator tool. I will assume the field id is 536870910. > > The information on the size of the attachment is stored in a B (or binary) > table which consists of the table and column id's like this for our example: > > B95C536870910 > > There are three columns in this table: The associated entry id, the size of > the file compressed and the size of the file uncompressed. The column names > are E1, CC and CO (that is C and the capital letter 'o'). > > Thus to find the size of the attachment, you have to ask the value of the CO > field for the entry. > > Direct SQL call: > > Select CO from B95C536870910 where E1 = C1; > > Then you can place this value into an integer field. > > Hope this helps. > > James Mckenzie > > > ________________________________ > > From: Action Request System discussion list(ARSList) > [mailto:[EMAIL PROTECTED] On Behalf Of David Yearsley > Sent: Monday, July 17, 2006 9:03 AM > To: [email protected] > Subject: Attachment Size > > > ** > I have a strange request to put the size of an attachment in a number field. > I have been searching the documentation and have been unable to find any > reference to the size. > > Does anyone know how to do this? > > Thanks > __20060125_______________________This posting was submitted with HTML in > it___ > > _______________________________________________________________________________ > UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org > -- Chris Williams Tel:+44 (0) 7769 657855 Mailto:[EMAIL PROTECTED] This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

