niccilaw
asked on
How update a person document in the Domino Directory based on form input
I have restricted access to our Domino Directory so that users only have "Reader" access. However, I want the users to be able to update their contact information on the "Work" tab of their person documents. I would like to create a form listing the fields on "Work" tab of the person document and provide this form to the users in a database.
How can I accomplish the following:
1. When the user creates a document using the form, automatically populate the fields with the current values in the user's person document and allow certain users to change this information on behalf of another user.
2. After the user makes changes to the field values, save and close the document then have an agent run against these documents and update the users' person document in the Domino Directory using the "Employee ID" as the key.
I am a beginner using Lotusscript so any code you can provide would greatly appreciated.
How can I accomplish the following:
1. When the user creates a document using the form, automatically populate the fields with the current values in the user's person document and allow certain users to change this information on behalf of another user.
2. After the user makes changes to the field values, save and close the document then have an agent run against these documents and update the users' person document in the Domino Directory using the "Employee ID" as the key.
I am a beginner using Lotusscript so any code you can provide would greatly appreciated.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
FYI Pt 2: RunOnServer will work asuming the users are working from the server. If they are working from a local replica, it will not.
ASKER
I am working on implementing your proposed solutions, but I was wondering if you all thought the code should have a way to compare the old person document values with the new ones? In the form I created, I have a table where the current person document information is displayed on one side and the user can input changes to their person document on the other side. I tried modifying the code to include a way to compare the values, but I cannot figure out how to compare two variants or convert them to a string so I can compare them.
Why is a compare needed ?
If you populate the fields with the original data, and then update the person doc with new data, why is a comparison needed anywhere ?
If you populate the fields with the original data, and then update the person doc with new data, why is a comparison needed anywhere ?
ASKER
I just did not want the code rewriting information that has not changed. Maybe I am overthinking this. One more thing, one of the fields contains an attachment. How can I modify the code to update the attachment?
SInce this Q has already been answered and closed, I would suggest opening a new Q for this.
1) All teh values from fiels on both sides will be in arrays, you need to (typically) compare element zero of both sides
2) Notes is pretty efficient about the procesisng of changed and unchanged values, so it is probably not necessary
3) You can do it with attachments as well, but that will probably need a bit more specific coding
4) SysExpert is correct, any additional stuff is probably more approapriate in a new Q, but don't sweat that too much
2) Notes is pretty efficient about the procesisng of changed and unchanged values, so it is probably not necessary
3) You can do it with attachments as well, but that will probably need a bit more specific coding
4) SysExpert is correct, any additional stuff is probably more approapriate in a new Q, but don't sweat that too much
Nice, no?