I thought I tried that, but evidently not. It works!!

Many Thanks Fred!

Pete

-----Original Message-----
From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] 
On Behalf Of Grooms, Frederick W
Sent: Thursday, November 15, 2007 10:26 AM
To: arslist@ARSLIST.ORG
Subject: Re: Is a Case function possible in Remedy?

Oops ... It should have been  WHERE C1 = '$1$' 

Or WHERE C1 = '$Request ID$'

Since it is a character string it must be enclosed in single quotes 


-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Joran, Peter P, CTR, OSD-CIO
Sent: Thursday, November 15, 2007 9:21 AM
To: arslist@ARSLIST.ORG
Subject: Re: Is a Case function possible in Remedy?

Tried that too Fred.

Thanks for the thought

Pete

-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Grooms, Frederick W
Sent: Thursday, November 15, 2007 10:11 AM
To: arslist@ARSLIST.ORG
Subject: Re: Is a Case function possible in Remedy?

Make your Where clause 

 WHERE C1 = '$C1$'

Fred

-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Joran, Peter P, CTR, OSD-CIO
Sent: Thursday, November 15, 2007 9:03 AM
To: arslist@ARSLIST.ORG
Subject: Re: Is a Case function possible in Remedy?

All
Interesting responses and many thanks for the input. The list never lets
me down and for that I'm very grateful!!

I was hoping to use a simple single AL. Direct SQL was my first choice
and it works great IF... I put a WHERE clause at the end of the
statement with a specific request ID. Any ideas on how to make a direct
SQL call look at the 'CURRENT TRANSACTION'? 


This works

SELECT  C536870937,
  CASE
    WHEN C536870937 = '1' THEN 'January' 
    WHEN C536870937 = '2' THEN 'February'
    WHEN C536870937 = '3' THEN 'March'
         ELSE 'Unknown'
             END 
                Month2
FROM T689
    WHERE C1 = '000000000000006'

This does not work

SELECT  C536870937,
  CASE
    WHEN C536870937 = '1' THEN 'January' 
    WHEN C536870937 = '2' THEN 'February'
    WHEN C536870937 = '3' THEN 'March'
         ELSE 'Unknown'
             END
                Month2
FROM T689
    WHERE C1 = $C1$

Pete

-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Rick Cook
Sent: Tuesday, November 13, 2007 8:42 PM
To: arslist@ARSLIST.ORG
Subject: Re: Is a Case function possible in Remedy?

I think I would use a Guide structure to emulate the Case.  That way,
you would drop out of the guide when a condition that was present in the
Run If quals of all of the Als/Filters in the Guide was met, and it
would only be set when it ran the matching WF object.

Rick

-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Michiel Beijen
Sent: Tuesday, November 13, 2007 1:19 PM
To: arslist@ARSLIST.ORG
Subject: Re: Is a Case function possible in Remedy?

If your example is really as simple as " if 1 then January..." try this:
* create a drop-down field with values 1 - 12 and add the months
* set the integer to this field - it will display your textual value.
If you would do another set fields from your drop down field to a char
field; you'll have the textual value in the char field.

Regards,

Michiel

On Nov 13, 2007 8:26 PM, Dwayne Martin <[EMAIL PROTECTED]> wrote:
> Another way of doing what amounts to a case function is to have your
active links or filters in a guide.  Each link or filter has a "Run If"
statement, then it takes whatever action you want, and exits the guide.
At the very end you can have a default that runs no matter what.
>
> Dwayne Martin
> James Madison University
>
> ---- Original message ----
> >Date: Tue, 13 Nov 2007 10:07:37 -0800
> >From: Thad K Esser <[EMAIL PROTECTED]>
> >Subject: Re: Is a Case function possible in Remedy?
> >To: arslist@ARSLIST.ORG
> >
> >   **
> >   Pete,
> >
> >   As Matt mentions, if you are trying to convert a
> >   number to a specific string, you can have all kinds
> >   of fun just using a single set fields.  For example,
> >   if $IntegerField$ is a number from 1-12, you can
> >   convert it to a month with the following set fields
> >   into a string:
> >   RTRIM(SUBSTR( "January  February March    April
> >    May      June     July     August
> >   SeptemberOctober  November December ",
> >   ($IntegerField$ - 1) * 9, (($IntegerField$ - 1) * 9)
> >   + 8))
> >
> >   If you really want to go gangbusters with this
> >   approach search the archives for "conversion to
> >   julian date" to see what's possible.
> >   Thad Esser
> >   Remedy Developer
> >   "Argue for your limitations, and sure enough,
> >   they're yours."-- Richard Bach
> >
> >   "Carey Matthew Black"        To arslist@ARSLIST.ORG
> >   <[EMAIL PROTECTED]>        cc
> >   Sent by: "Action        Subject Re: Is a Case
> >   Request System                  function possible in
> >   discussion                      Remedy?
> >   list(ARSList)"
> >   <arslist@ARSLIST.ORG>
> >
> >   11/13/2007 09:18 AM
> >
> >   +---------------------+
> >   |  Please respond to  |
> >   | arslist@ARSLIST.ORG |
> >   +---------------------+
>
> >
> >   Peter,
> >
> >   Another variation on that is to use a filter on Get
> >   Entry and a
> >   Display only field. That way the Set field action
> >   simply returns the
> >   'Display Only' field and the filters in effect do
> >   the "Case" operation
> >   to map a value of 1 to "January" from the record
> >   that is being
> >   returned.
> >
> >   Or...
> >   If the integer value is actually a Selection field
> >   then I think that
> >   field can do the map to an English string by simply
> >   returning the
> >   value to a Char field instead of an Integer field.
> >
> >   However those solutions make some assumptions about
> >   how you are using
> >   the case statement too. (maybe they apply maybe they
> >   do not.)
> >
> >   --
> >   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 Nov 13, 2007 11:45 AM, Eric Cleereman (IT)
> >   <[EMAIL PROTECTED]> wrote:
> >   > Hi Pete,
> >   >
> >   > Here are a couple options:
> >   >
> >   > 1. If your DB supports Case, you can do a set
> >   fields using SQL.
> >   > 2. You can store the values in a separate form,
> >   then set the values from
> >   > that.
> >   >
> >   > We use the second option, as it seems a lot easier
> >   to maintain.  We've
> >   > got a form which stores the month in 4 fields.  M
> >   is 1-12, MM is 01-12,
> >   > MMM is Jan-Dec, and MMMM is January-December.
> >    This allows easy
> >   > conversions between any of these formats.
> >   >
> >   > Eric Cleereman
> >   >
> >   >
> >   > -----Original Message-----
> >   > From: Action Request System discussion
> >   list(ARSList)
> >   > [mailto:[EMAIL PROTECTED] On Behalf Of Joran,
> >   Peter P, CTR, OSD-CIO
> >   > Sent: Tuesday, November 13, 2007 11:30 AM
> >   > To: arslist@ARSLIST.ORG
> >   > Subject: Is a Case function possible in Remedy?
> >   >
> >   > All
> >   > Is there a way to do a case function, or something
> >   like it, in remedy
> >   > for a set fields action?
> >   >
> >   > For example:
> >   > If 1 than January
> >   > If 2 than February...
> >   >
> >   > Thanks
> >   > Pete
> >   > ARS 6.3
> >   > SQL Server 2000
> >
> >
________________________________________________________________________
____
___
> >   UNSUBSCRIBE or access ARSlist Archives at
> >   www.arslist.org
> >   Platinum Sponsor: www.rmsportal.com ARSlist: "Where
> >   the Answers Are"
> >
> >   ***IMPORTANT NOTICE: This communication, including
> >   any attachment, contains information that may be
> >   confidential or privileged, and is intended solely
> >   for the entity or individual to whom it is
> >   addressed. If you are not the intended recipient,
> >   you should delete this message and are hereby
> >   notified that any disclosure, copying, or
> >   distribution of this message is strictly prohibited.
> >   Nothing in this email, including any attachment, is
> >   intended to be a legally binding signature.***
> >
> >   __20060125_______________________This posting was
> >   submitted with HTML in it___
>
> ______________________________________________________________________
> _________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org 
> Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
>



--
Met vriendelijke groet / Kind regards
Michiel Beijen
______________________________________________________
MANSOLUTIONS
Energieweg 60-62
3771 NA Barneveld
The Netherlands
Tel. +31-(0)612968592
Mail [EMAIL PROTECTED]
Internet http://bsm.mansolutions.nl

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

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

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

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

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

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

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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to