Or couldn't you just find the max length by a direct SQL
Select MAX( LEN(CompanyName) ) from table;

Set that to a temp integer field.. use this value in your RPAD function..

Cheers

Joe
  -----Original Message-----
  From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] Behalf Of Ganga Prasad
  Sent: Wednesday, March 05, 2008 1:55 PM
  To: [email protected]
  Subject: Re: Pad the info


  ** Hi Mark

  For your purpose try the following

  ((($Trouble Ticket #$ +  " ") + RPAD($Company$, LENGTH, " ") +  " ") +
$Status$

  This LENGHT can be a constant or it can be calculated to be Max Lenght of
Company Field.

  Thanks and Regards,
  Ganga Prasad Pattnaik,
  ( Remedy Skilled Professional )


  On Tue, Mar 4, 2008 at 6:48 PM, Carey Matthew Black <[EMAIL PROTECTED]>
wrote:

    Mark,

    Be warned... your approach assumes that the user will be viewing the
    output in a fixed width font. If they are using a variable width font
    (like my gmail account uses) then the value will likely not align.

    If you really want formatting that is likely to be as you expect it,
    then either send it in an attached PDF, or as HTML. I know of no
    better solutions to deal with formatting issues than those two paths.

    --
    Carey Matthew Black
    Remedy Skilled Professional (RSP)
    ARS = Action Request System(Remedy)

    Love, then teach
    Solution = People + Process + Tools
    Fast, Accurate, Cheap.... Pick two.


    On Mon, Mar 3, 2008 at 2:17 PM, Brittain, Mark <[EMAIL PROTECTED]>
wrote:
    > **
    >
    >
    > Hi All,
    >
    > I have an escalation that looks for Trouble Tickets that have not
been
    > touched in a week. When there is a match, I do a set fields to another
form.
    > Then I have another escalation that emails out the results. The fields
    > pushed are
    >
    > ((($Trouble Ticket #$ +  " ") + $Company$) +  " ") + $Status$
    >
    > The problem is the Company name can be all different lengths, so the
result
    > is wavy. Like this
    > TT#01064088 Corporate Systems - Internal WorkInProgress
    > TT#01077255 NaviSite, Inc. Assigned
    >
    > I would like it to be placed like this
    > TT#01064088 Corporate Systems - Internal    WorkInProgress
    > TT#01077255 NaviSite, Inc.                           Assigned
    >
    >
    > Is there a way to do that?
    >
    > Thanks
    > Mark
    >
    > Mark Brittain
    > ESM Remedy Developer
    > NaviSite Inc.
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date: 3/5/2008
9:50 AM

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

Reply via email to