Ok, I looked into this a little further.

If you query the db you can get the file sizes.  Using a set fields action
will only get you the full path + file name of the attachment.

If you know the schemaid and fieldid you can query the table fairly easily.

If you describe the attachment table (mine being b1894) you will see four
columns.
     c1             = request id
     c<fieldid>   = The file name with full path
     co<fieldid> = The original file size in byes
     cc<fieldid> = The compressed file size in bytes.

So a simple sql set fields will get you all the information you need.

HTH,

Brian Goralczyk


On Fri, Dec 6, 2013 at 11:24 AM, Misi Mladoniczky <m...@rrr.se> wrote:

> Hi,
>
> I think you will get the name and prefixed by two numbers. These
> correspond to
> the compressed and uncompressed size of the attachment. It is easy to parse
> out these numbers and separate them from the name using a couple of
> STRSTR/SUBSTR/... calls.
>
>         Best Regards - Misi, RRR AB, http://www.rrr.se (ARSList MVP 2011)
>
> Ask the Remedy Licensing Experts (Best R.O.I. Award at WWRUG10/11/12/13):
> * RRR|License - Not enough Remedy licenses? Save money by optimizing.
> * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
> Find these products, and many free tools and utilities, at http://rrr.se.
>
> > If you do a set fields action (with a button) on an active link and set
> > your character field with $Attachment$ (or whatever you called your
> > attachment field), you will get the name, but I'm not sure how to
> > retrieve the size.
> >
> > Lisa
> >
> > -----Original Message-----
> > From: Action Request System discussion list(ARSList)
> > [mailto:arslist@ARSLIST.ORG] On Behalf Of Antonio Monizza
> > Sent: Friday, December 06, 2013 11:07 AM
> > To: arslist@ARSLIST.ORG
> > Subject: how to get&set file name and size from an attachment pool
> >
> > **
> > Hi folks,
> >
> >
> > is there a simple way to have a filter set a couple of fields in a form
> > with the name and size of a file stored in the attachment pool on the
> > same form?
> >
> >
> >
> > thanks in advance
> >
> >
> > ciao
> >
> > _ARSlist: "Where the Answers Are" and have been for 20 years_
> >
> >
> _______________________________________________________________________________
> > UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> > "Where the Answers Are, and have been for 20 years"
> >
>
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> "Where the Answers Are, and have been for 20 years"
>

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to