Hello Carey,
I wanted to thank you for the detailed response. With some minor
tweaking, this worked great and it keeps the results in in one window
which the customer preferred.
much appreciated.
On 1/6/08, Carey Matthew Black <[EMAIL PROTECTED]> wrote:
> SMR,
>
> I would think that a table field would get the job done very easily.
> The only "trick" would be that you need an active link guide to set
> the value, refresh the table field, check the number of rows in the
> table and decide to either stop, or shorten the string and loop
> through the guide again. So something like this...
>
> Table field qual: 'field_to_find_value_in' LIKE $String_to_look_for$+"%"
>
> "OnReturn" active link --> Set a field ('String_to_look_for') with the
> initial value then call a guide.
>
> Guide:
> Lable: "Start"
> AL0 : Action 0: 'zLength' = LENGTH($String_to_look_for$)
>
> AL1 : RunIf : 'zLength' >=1
> AL1 : Action 0: Refresh table field
> AL1 : Action 1: Set field 'zInt' = $ LASTCOUNT$
> AL1 : ELSE Action 0: Exit Guide
>
> AL2 : RunIf: If : $ LASTCOUNT$ <= 0 AND 'zLength' >=2
> AL2 : Action 0: 'String_to_look_for' =
> LEFT($String_to_look_for$,LENGTH($String_to_look_for$)-1)
> AL2 : Action 1: GOTO LABEL "Start"
>
> That guide should exit when it finds one or more records in the table
> refresh or it should shorten the string (down to one character [ You
> might want to change that AL1,AL2 RunIf's a bit] ) and try again.
>
> Then if you could also choose to add another active link "OnReturn"
> and do a set field action (if you want to show a picklist instead of
> the table field) or you can call a guide...etc... You might even want
> to have an active link to check for the case of 'String_to_look_for'
> being = $ NULL$ and tell the user that "no match was found for any of
> those combinations" too.
>
> HTH.
>
> --
> 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 Jan 6, 2008 6:01 PM, Marquez Rankin <[EMAIL PROTECTED]> wrote:
> > **
> > I need to create a search which will search for a string (ie. "LMNOPQR"),
> > then search that minus a character (ie. LMNOPQ") if no records match and
> so
> > on.
> >
> > I would like to have this OnReturn of the character field.
> >
> > I have experimented with writing direct SQL and/or using a chain of active
> > links with SUBSTR to remove the last character
> >
> > Has anyone done this in Remedy? I'd like to limit this to Remedy code but
> > SQL is an option.
> >
> > -SMR
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
>
--
Sent from Gmail for mobile | mobile.google.com
Now let's all take a moment to ponder
the depth, brilliance, and emotional gravity of Mr. Rankin's above statements.
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"