(sorry my English)I have an agent (action menu selection/all selected documents) name ‘Change’ and ‘Change role’ action button on the view’s action bar. I want to change more then one’s selected document’s CreatorRole -fields value at a time. Problem: if I select example 5 documents by the view then my agent code shows @Prompt window also 5 times but I want that @Prompt shows only once.
first, you don’t need the first line anymore, if you are on Notes R6. If you have R5 or lower users still, then keep it. Otherwise, it just makes the formula too busy.
Now, I may be WAY off, but I am thinking your formula is way off. I don’t know why you are doing the @Elements(CreatorRole) part…I am not getting that.
I think I am hearing you say you want to have a prompt come up ONCE asking what the new role will be. Then your answer will be put on ALL of the selected documents.
If so, try this in LotusScript instead of formula language:
dim s as new notessession
dim db as notesdatabase
dim newrole as string
dim dc as notesdocumentcollection
set db = s.currentdatabase
set dc = db.unprocesseddocuments
newrole = inputbox(“enter the new role”)
call dc.stampall(“CreatorRole”,newrole)
Let me know if that doesn’t work for you. If you need to contact me to let me know you have posted a reply here, send a note to kackster AT gmail.com (I am not using the @ symbol so my email address will not be recognized by some bot)