Link to home
Start Free TrialLog in
Avatar of miklesw
miklesw

asked on

Keeping Names Fields up to date.. without having adminP delete entries for deleted users

I have been wondering about this for quite a while..

sometimes, it is important to have a names field updated, be it an authors, readers or just a names field used in categorized view or embedded view...

A db can be marked for updating by adminp from the ACL...

The prob is that adminp Clears the field when the user is deleted.. resulting in orphan documents..especially in cases where you are basing the "identity" of a document on the LN name.

Is there a way to control this?

In this particular case.. I can't use a response hierarchy as the names field in question must contain multiple names..

The only workaround I can think of is having a secondary text list... and doing something on the lines of @unique(nameslist:textlist) in the view...however that would still be a problem since it would include old names from the textlist


Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Use a scheduled agent to track orphaned documents (based on a view) so the documents can be updated. AFAIK there is no standard feature in Domino that updates fields with a new "owner".
Avatar of miklesw
miklesw

ASKER

In this case.. there won't be orphan documents...since the names field has multiple values..

Might help if I give you the bigger picture..

Documents:
- Activity (activity details & list of Attended staff)
- Staff profile (staff details, photos, cv, qualification)
            - Embedded view showing Activities attended (this must work for leavers)


"AFAIK there is no standard feature in Domino that updates fields with a new "owner"" - If you go to the ACL > advanced > Action ..you can enable this... When adminP updates the db ACL ..it will update the names fields


I meant with "updates" that you can specify somewhere that one name should be replaced by some other, e.g. when someone leaves the company and someone else in the project team takes over. If you don't want the adminP-replacement, then just don't put historical information in a Names field, but use a text field.
Avatar of miklesw

ASKER

oh ok sorry about that.. I misread your comment..

I need the AdminP replacement for changes in surname or OU..




ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of miklesw

ASKER

Yes, I thought about having something like that

TextList            NamesList
-----------         -----------
Mary Smith      Mary Jones
John smith       miklesw/UK
Miklesw/IT  

The problem is that this is a list.. how am I going to exclude the old names in the textList

If I do @unique(textlist:nameslist)

The result will be:
Mary Smith/MT      
Mary Jones/MT
John smith/MT    
Miklesw/UK
Miklesw/MT  

At this point, I'm considering having a seperate response doc to the activity doc for each attendee.. having a LNname field and a textName field.. So I can use an @if(LNname="";textname;LNName) in views

the prob is that I have to include "activity details" in each attendee doc.. and is simply messy..

I would suggest that Activity details shoulld either be a response doc or a seperate form that is linked to the main form by a unique key.

R6 and above have good options for list handling if needed.

I hope this helps !
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of miklesw

ASKER

as Sys and Marilyn suggested.. I think the only way around this is to use a duplicate text field with a resp doc for each attendee..with an agent updating the textfield when there is a change

Doc: Staff Profile (LNname, firstname, secondname, embView-MyActivities)
Doc: Activity (date,Time,title,EmbView-Attendees)
     Rsp: Attendee (LNName, TextLNName, FullAttendance?, comments)
     Rsp: Attendee (LNName, TextLNName, FullAttendance?, comments)
     Rsp: Attendee (LNName, TextLNName, FullAttendance?, comments)
 
The problem is that the information from the Activity doc needs to be duplicated(and refreshed) in the Attendee Response doc.. since the MyActivities embedded view has to use the response documents for showSignleCategories and displaying full or partial attendance..

Unless. maybe..  I can have an agent populate a text list in the activity doc from the maintained name fields in the response docs..(attendedlist & partiallyattendedList)

OR

I can use some events in the embedded view so that it opens the parent activity doc instead of the response doc.. never tried this..not sure if it is even possible.

Sorry about going beyond the scope of the question.. but writting it down for others to understand helps putting thigns into perspective :)
YOu can populate the main and response docs (if they are indeed parent and children) easily in the query close event of each.  The children write up to the parent and changes in the parent populate down to the children.  Very easy if you have the hierarchy set up.
Oops, in 6.5 do the postsave event.