Great little snippet, Jim. Put it into my CodeVue library. Thanks for sharing!
Tim On May 17, 2012, at 7:41 AM, Jim Pitchford wrote: > Thanks Valdemar > > I ended up with a similar approach using the g.members: > > dim g as ABGroupMBS > if hGroup <> "" then > g = Get_ABGroup(hGroup) > end > > dim actioMembers() as ABPersonMBS = g.members > dim rMembers() as ABPersonMBS > > for each member as ABPersonMBS in actioMembers > > dim fn as string = member.valueForProperty(a.kABFirstNameProperty) > dim mn as string = member.valueForProperty(a.kABMiddleNameProperty) > dim ln as string = member.valueForProperty(a.kABLastNameProperty) > dim matched as boolean = true > > for each name as string in names > > //exit if name is not matched by at least one of fn, mn, ln > if instr(fn, name) > 0 or instr(mn, name) > 0 or instr(ln, name) > 0 > then > Continue > else > matched = false > exit > end > > next > > if matched = true then > rMembers.append member > end > > next > > ListOwners( rMembers, hGroup ) > > This now works fast enough to search for names on the fly. > _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list [email protected] https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
