I'm just catching up on my arslist, and might have missed a nuance of your 
goal, but would a computed group help you in any way that would prevent 
you from having to monkey with the user data?

---
Having said that, and with full awareness of the issues brought up by 
Axton, you can eliminate issues with a preceding semi-colon by adding one 
in as part of the replace:
Assuming:
Group List = "511;507;508;501;518;521;55598;"
xtmpchar2 = "55598"

Then:
New List = REPLACE(";" + $Group List$ +  ";",  ";" + $xtmpchar2$ + ";", 
";")

You could end up with a Group List that starts with a semi-colon, pull it 
out with a RIGHT() function if you need to.
Also, depending on details, you could end up with a double semi-colon in 
your list.  After any looping is done, you can pull the 2nd one out with 
an additional:
REPLACE($Group List$,  ";;",  ";")
---

I am curious, what is the nature of this group that only needs members for 
a day?

Thad Esser
Remedy Developer
"Argue for your limitations, and sure enough, they're yours."-- Richard 
Bach



Brien Dieterle <[EMAIL PROTECTED]> 
Sent by: "Action Request System discussion list(ARSList)" 
<[email protected]>
09/23/2008 11:17 AM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: split a field and loop on each piece






** 
Right, I am only flipping read-only to floating, and back again... Also, 
the database looks like:

511;507;508;501;518;521;55598;

So, I think I can do a 
REPLACE($Group List$,"55598;","")

and it should be all good after all.  Interestingly, Remedy Admin won't 
even let you save an action that threatens to corrupt the format of this 
field (for instance, I tried saving it with replace: ";55598" instead of 
"55598;" and it actually said "Error with one of the field/assignments in 
the set filter/active link/escalation definition : User (ARERR 168)."

I thought I was good to go there, and I just realized that

REPLACE($Group List$,  "55598;",  "")  or even using the group's text-name

upon saving, gets converted to:

REPLACE($Group List$,  " 55598;",  "")

Notice the extra space before the group id?  Any other variation seems to 
trigger the error message referenced above.  Weird!!

Other than that, I can successfuly add a user to a group, and change their 
license from Read to Floating, and back again.  I just can't remove them 
from the group.  Presumably, I can copy the Group List to a tmp field, do 
the REPLACE() there, and then put that back in the user group field to get 
around Remedy Admin tool being too "smart"...

Thanks for the suggestions!!



On Tue, Sep 23, 2008 at 10:17 AM, Opela, Gary L CTR USAF AFMC 72 CS/SCBAH 
<[EMAIL PROTECTED]> wrote:
I'm not sure of the implications with a floating license of
adding/removing a license, since they are not tied to a user.

However, with a Fixed License (which is not what you stated you are
using), you can only reassign it 3 times per week before it is locked
for the rest of the seven days.

Gary

-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Brien Dieterle
Sent: Tuesday, September 23, 2008 11:26 AM
To: [email protected]
Subject: Re: split a field and loop on each piece

**
Haha, thanks for the tip-- I was planning to use "" in the replace.   I
forgot to add that anyone that I add to this group also needs a floating
license ... and so I'll be changing that license back to read-only as
part of the group "flush".  Of course, when I set it back to read-only,
I won't know if that user had previously been givin a floating license
for some other reason... Unless I add another field to the user table,
like a checkbox that says "user had a floating license before I messed
with this".

This is almost getting silly! :-)

Brien


On Tue, Sep 23, 2008 at 9:00 AM, Opela, Gary L CTR USAF AFMC 72 CS/SCBAH
<[EMAIL PROTECTED]> wrote:


       Actually, I think you might want to do a REPLACE($Group List$,
";1234;"
       ";")

       This way, ;1;1234;12;23;4; would go to ;1;12;23;4;

       So, the ;1234; would go to ;, so you would still have your
proper
       delimiter. Test this in a small scale first to make sure you
don't screw
       up all of your user's groups. I've seen before where junk
characters
       would get put in this field at the database level, and break the
user's
       access to anything.

       Gary


       -----Original Message-----
       From: Opela, Gary L CTR USAF AFMC 72 CS/SCBAH
       Sent: Tuesday, September 23, 2008 10:58 AM
       To: [email protected]

       Subject: RE: split a field and loop on each piece

       Hey, I got an idea.

       Whenever you are trawling the user table, you can use the
REPLACE
       function.

       SO, have an escalation hat runs against user, that does the
following:
       REPLACE($Group List$, ";1234;" ";;")

       You might have to tweak the statement a bit, but that should
chop out
       the group id that you are getting rid of.

       Have the escalation that adds people back in run about 30
minutes to an
       hour later.


       Gary

       -----Original Message-----
       From: Action Request System discussion list(ARSList)
       [mailto:[EMAIL PROTECTED] On Behalf Of Brien Dieterle

       Sent: Tuesday, September 23, 2008 10:45 AM

       To: [email protected]
       Subject: Re: split a field and loop on each piece

       **
       Yes on trawling User table, I want to remove everyone from this
group
       every night and then add everyone back from the guide.

       I'll have to think about the trigger some more, but I think I
want the
       guide to trigger on modify so that if a new user is added to
that field
       they are added to the group immediately instead of only during
the
       nightly sync.

       Thanks again for all your help!

       Brien


       On Tue, Sep 23, 2008 at 4:52 AM, Opela, Gary L CTR USAF AFMC 72
CS/SCBAH
       <[EMAIL PROTECTED]> wrote:


              Yeah, I was wondering if filter phasing would cause you
an
       issue. Adding
              the `! was good.

              For the part on the escalations, why are you trawling the
user
       table,
              looking for the group and removing it? Are you going
through
       each night
              and removing all users from the group, then re-adding
only the
       users
              from the guide?

              As far as having a field to modify to trigger the
workflow, I
       would
              suggest adding a read/only radio button so that your
filter that
       calls
              the guide can explicitly check for that flag being set.
This way
       you can
              lock it down to run exactly only when you want it to.


              Gary

              -----Original Message-----
              From: Action Request System discussion list(ARSList)
              [mailto:[EMAIL PROTECTED] On Behalf Of Brien Dieterle

              Sent: Monday, September 22, 2008 6:15 PM
              To: [email protected]
              Subject: Re: split a field and loop on each piece

              **

              Gary, brilliant. Works like a champ!

              For posterity, just had to add `! to the filter that
actually
       does the
              group adding,and a tmpgroups field to store the user's
other
       groups,
              because I can't seem to append to a field during a push
       operation.

              Now I just need to setup an escalation to "flush" this
group
       (crawl User
              table and do a set fields/string replace on the group I
want to
       flush?),
              and then trigger this filter guide to push everyone back
into
       the group
              (crawl my other table (escalation) and modify a field to
trigger
       filter
              action (modify) to launch the filter guide?.   The idea
being to
       keep a
              group list populated with exactly and only the users from
the
       filter
              guide Gary outlined.

              If there is a better way than above, please feel free to
let me
       know....
              I'll save this for tomorrow.

              Thanks again Gary and everyone else that responded!

              Brien


              On Mon, Sep 22, 2008 at 12:32 PM, Opela, Gary L CTR USAF
AFMC 72
              CS/SCBAH <[EMAIL PROTECTED]> wrote:


                     Good point, you are using usernames.

                     Whatever the format in the database is what you
should go
       by, as
              filters
                     are server-side code, and couldn't care less what
the
       client
              displays.

                     Let me know if it works, so I'll feel good and
will be
       nicer to
              my
                     co-workers :)

                     Gary


                     -----Original Message-----
                     From: Action Request System discussion
list(ARSList)

                     __Platinum Sponsor: www.rmsportal.com ARSlist:
"Where the
              Answers Are" html___



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



       __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the
Answers Are"
       html___


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



__Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
html___

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

__Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" 
html___ 

*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.
*

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

Reply via email to