Re: Looping Search
This WebDNA talk-list message is from 2006
It keeps the original formatting.
numero = 66790
interpreted = N
texte = Thanks Bill. The threaded bulleting board analogy is exactly what I wasthinking. The reassignment scenario seems like the best approach.On 4/5/06 4:40 PM, "devaulw@onebox.com"
wrote:> This seems alot like a threaded bulletin board.> > So the problem is how to re-assign subordinates in the hierarchy when a> supervisor disappears.> > One way might be to prevent deleting 2 until it's subordinates are re-assigned> (i.e. throw up an error until the user fixes the condition). Not very> friendly since it lacks an intelligent default.> > Another way is to reassign the subordinates upon deleting 2 via a default,> i.e. 2 has a supervisor and when 2 is deleted, automatically assign everyone> who reports to 2 to 2's supervisor. I think that's what you were proposing.> Seems like a good solution too. Get 2's supervisor, search for anyone with 2> as a supervisor, replacefounditems with 2's supervisor.> > If an entry already has a missing supervisor [lookup =notfound], it needs to> be flagged and a supervisor assigned.> > Bill> > > -----Original Message-----> From: Clint Davis > Sent: Wed, 05 Apr 2006 15:10:58 -0500> To: "WebDNA Talk" > Subject: Re: Looping Search> > I *do* have a field in the database where each person's immediate supervisor> is listed. Right now, Person 1 is hard coded into the page. A [search] for> anyone whose immediate supervisor is Person 1 yields the Person 2 listing> and so on down the chain. This works unless someone at the top is removed:> if Person 2 left, Persons 3, 8, and 11 would have to be reassigned to Person> 1 as their immediate supervisor, or the whole chart would break.> > > On 4/5/06 2:57 PM, "Pat McCormick" wrote:> >> Why not just have a field for immediate supervisor for every Person?>> A demotion simply means changing the supervisor field. Or i guess it>> could also mean coming to a stop. (get it? demotion? anyone?)>> >> >> On Apr 5, 2006, at 2:24 PM, Clint Davis wrote:>> >>> I need to setup and org chart like this:>>> >>> Person 1>>> -----Person 2>>> ----------Person 3>>> ---------------Person 4>>> ---------------Person 5>>> ---------------Person 6>>> ---------------Person 7>>> ----------Person 8>>> ---------------Person 9>>> ---------------Person 10>>> ----------Person 11>>> ---------------Person 12>>> ---------------Person 13>>> ---------------Person 14>>> >>> All of these people have a record in the personnel database with a field>>> for>>> their immediate supervisor. Can this be done with a [loop]'ed [search]>>> versus>>> my current nested [search]es? I don't want it to break if Person 3 gets>>> demoted, for example.-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Thanks Bill. The threaded bulleting board analogy is exactly what I wasthinking. The reassignment scenario seems like the best approach.On 4/5/06 4:40 PM, "devaulw@onebox.com" wrote:> This seems alot like a threaded bulletin board.> > So the problem is how to re-assign subordinates in the hierarchy when a> supervisor disappears.> > One way might be to prevent deleting 2 until it's subordinates are re-assigned> (i.e. throw up an error until the user fixes the condition). Not very> friendly since it lacks an intelligent default.> > Another way is to reassign the subordinates upon deleting 2 via a default,> i.e. 2 has a supervisor and when 2 is deleted, automatically assign everyone> who reports to 2 to 2's supervisor. I think that's what you were proposing.> Seems like a good solution too. Get 2's supervisor, search for anyone with 2> as a supervisor, replacefounditems with 2's supervisor.> > If an entry already has a missing supervisor [lookup =notfound], it needs to> be flagged and a supervisor assigned.> > Bill> > > -----Original Message-----> From: Clint Davis > Sent: Wed, 05 Apr 2006 15:10:58 -0500> To: "WebDNA Talk" > Subject: Re: Looping Search> > I *do* have a field in the database where each person's immediate supervisor> is listed. Right now, Person 1 is hard coded into the page. A [search] for> anyone whose immediate supervisor is Person 1 yields the Person 2 listing> and so on down the chain. This works unless someone at the top is removed:> if Person 2 left, Persons 3, 8, and 11 would have to be reassigned to Person> 1 as their immediate supervisor, or the whole chart would break.> > > On 4/5/06 2:57 PM, "Pat McCormick" wrote:> >> Why not just have a field for immediate supervisor for every Person?>> A demotion simply means changing the supervisor field. Or i guess it>> could also mean coming to a stop. (get it? demotion? anyone?)>> >> >> On Apr 5, 2006, at 2:24 PM, Clint Davis wrote:>> >>> I need to setup and org chart like this:>>> >>> Person 1>>> -----Person 2>>> ----------Person 3>>> ---------------Person 4>>> ---------------Person 5>>> ---------------Person 6>>> ---------------Person 7>>> ----------Person 8>>> ---------------Person 9>>> ---------------Person 10>>> ----------Person 11>>> ---------------Person 12>>> ---------------Person 13>>> ---------------Person 14>>> >>> All of these people have a record in the personnel database with a field>>> for>>> their immediate supervisor. Can this be done with a [loop]'ed [search]>>> versus>>> my current nested [search]es? I don't want it to break if Person 3 gets>>> demoted, for example.-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Clint Davis
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
[searchString] (1997)
First postarg not taking in $Commands (1997)
Listfiles on network with NT (2000)
Adding Message to Order (1997)
Nested tags count question (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
pc (1997)
Running _every_ page through WebCat ? (1997)
webcat/chat/javascript/IE on windows only problem - long,code included - nevermind (2002)
[WebDNA] [append] does not add the newline char at the end of the new record?! (which causes subsequent [search] to fail.) (2009)
Return records from another (1997)
Special characters & [sendmail] (1998)
F3 crashing server (1997)
FlushDatabase Suggestion (1998)
[checkboxes] and webcat (2000)
Huge databases and RAM (1998)
Automatic thumbnail images (1998)
Stats (2004)
BGcolor (1997)
[WebDNA] HMAC-SHA1 Encryption (2013)